Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Hiding a Players name?

Asked by
99names 10
8 years ago

How would I hide a players name?

I've tried changing the NameDisplayDistance to 0, and changing the DisplayDistanceType, but it is making the other player's names disappear?

I'm using a TextButton, please help.

2 answers

Log in to vote
0
Answered by
Im_Kritz 334 Moderation Voter
8 years ago

Going off of what 1waffle1 said. This is inside of a Script in a TextButton in a ScreenGui

local Button = script.Parent

local function Hide()
    local Player = Button.Parent.Parent.Parent
    if Player.Character then
        Player.Character:WaitForChild('Humanoid').DisplayDistanceType = "None"
    end
end

Button.MouseButton1Click:connect(Hide)
Ad
Log in to vote
0
Answered by
1waffle1 2908 Trusted Badge of Merit Moderation Voter Community Moderator
8 years ago

Set Humanoid.DisplayDistanceType to "None"

Name and healthbar will not be displayed under any circumstance

Answer this question