Hide player's nametag

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

Andreas

Member
Mar 28, 2020
20
0
1
55
Hello! Im trying to make a murder mystery minigame where you can't see each others nametags so you have to work together to find out who the killer is.

My problem is that i need to hide a player's nametag so the other player's cant see it.
 
I just wanna hide it
You need to mess with minecraft integrated objective things
[doublepost=1587214636,1587214220][/doublepost]
code_language.skript:
on script load:
    make console execute "scoreboard teams add NoTag Blue_Team"
    make console execute "scoreboard teams option NoTag nametagVisibility never"
function addNoTag(player: player):
    make console execute "scoreboard teams join NoTag %{_player}%"
function removeNoTag(player: player):
    make console execute "scoreboard teams leave NoTag %{_player}%"

This is a really basic way but useful if it works mark me as best answer
:emoji_slight_smile:
 
code_language.skript:
on script load:
    make console execute "scoreboard teams add NoTag Blue_Team"
    make console execute "scoreboard teams option NoTag nametagVisibility never"
function addNoTag(player: player):
    make console execute "scoreboard teams join NoTag %{_player}%"
function removeNoTag(player: player):
    make console execute "scoreboard teams leave NoTag %{_player}%"
command hide:
    trigger:
        addNoTag(player)
command show:
    trigger:
        removeNoTag(player)

It don't hide your name directly, you should use triggers like commands as i did there
 
code_language.skript:
on script load:
    make console execute "scoreboard teams add NoTag Blue_Team"
    make console execute "scoreboard teams option NoTag nametagVisibility never"
function addNoTag(player: player):
    make console execute "scoreboard teams join NoTag %{_player}%"
function removeNoTag(player: player):
    make console execute "scoreboard teams leave NoTag %{_player}%"
command hide:
    trigger:
        addNoTag(player)
command show:
    trigger:
        removeNoTag(player)

It don't hide your name directly, you should use triggers like commands as i did there

I still can't get it to work. Idk if im doing something wrong or its the script.
 
But i cant open the .gz files that have the messages in them
[doublepost=1587298734,1587298651][/doublepost]I figured it out
 
Are you using and side-bar plugin or something that mess with scoreboard? I use this method for my Rust server in order to hide the players nametag like the actual game, but i had to remove it, my scoreboard was buggy
 
Status
Not open for further replies.