Hello,
I have a name tag script here, and everything works fine. The only problem is when you reset, output turns this error:
ServerScriptService.MainHandler:6: attempt to index nil with 'Head'
I am unsure why this is happening. I tried changing line 1 on the script to:
player.Character.Head
But it doesn’t work.
Here is the script in server script service:
game.Players.PlayerAdded:Connect(function(player)
local clone = script.RPName:Clone()
clone.Parent = game.Workspace:FindFirstChild(player.Name).Head
player.CharacterAdded:Connect(function()
local clone = script.RPName:Clone()
clone.Parent = game.Workspace:FindFirstChild(player.Name).Head
local human = player.Character:FindFirstChild("Humanoid")
end)
end)