Hello there fellow developers. I am trying to make a script that hides an above head name tag that is given out to allow players. Everyone can see everyone’s tag as well as their own. However, when I try to use a remote event and local script to pick it up, it does not make my above head name tag go invisible. As some useful information, NameTag is the surface gui and Label is the TextLabel under the SurfaceGui that actually shows your nametag. Any help here is greatly appreciated!
ServerSide Script:
game.ReplicatedStorage.Interactions.Client.HideHeadTag:FireAllClients(game.Players:GetPlayerFromCharacter(tool.Parent.Name))
StarterPlayerLocalScript:
local plr = game.Players.LocalPlayer
game.ReplicatedStorage.Interactions.Client.HideHeadTag.OnClientEvent:Connect(function(plrtohide)
for _, player in pairs(game.Players:GetChildren()) do
if player.Name == plrtohide then
player.Character.Head.NameTag.Label.Visible = false
end
end
end)
Note: I have no errors.