So I was trying to make a overhead gui which states your name.
Now I somehow cannot clone BillboardGuis anymore, the names are correct, they are writen correct in the code.
Code:
local plr = game.Players.LocalPlayer
game.Players.PlayerAdded:Connect(function(plr)
plr.CharacterAdded:Connect(function(char)
wait(1)
local name = game.ServerStorage.Name:Clone()
name.Parent = char.Head
name.TextLabel.Text = plr.Name
end)
end)
Have you checked the Player’s head has loaded yet?
You might want to use .CharacterAppearanceLoaded instead, that way they get given name tags upon the appearance being loaded in its entirety or you can yield for the head.
Not like that, when I go into the Explorer it isn’t there. I went to the documentation and it says that objects in ServerStorage are not replicated to the client and have to be accessed differently.
I put the Gui in ReplicatedStorage instead and that fixed it. Try doing that if that won’t mess up anything in your game.
Edit: The code I used is game.Players.PlayerAdded:Connect(function(plr) plr.CharacterAdded:Connect(function(char) wait(1) local name = game.ReplicatedStorage:WaitForChild("Name"):Clone() name.Parent = char.Head name.TextLabel.Text = plr.Name end) end)
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function()
local Tag = game.ServerStorage.Tag:Clone() -- Put The Name Tag name Here
repeat wait() until game.Workspace:FindFirstChild(player.Name).Head
Tag.Name = "NameTag"
Tag.TextLabel.Text = player.Name
Tag.Parent = game.Workspace:FindFirstChild(player.Name).Head
end)
end)
I tested it out! It works! (To Fix the Nil head issue, I added the repeat wait() until the head loads! )
By doing game.ServerStorage.Name, it automatically sets precedence to the property and not the child - you can’t technically force this unless you made your own table which is game. Computers don’t have logic, it just assumes the property it found first is what your looking for.
By doing :WaitForChild() you specified your looking for the child, this is the only easy workaround.