Please help i can't get the text to change to the players name?

local Nametag = game:GetService("ReplicatedStorage"):WaitForChild("Nametag")

game.Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		local ClonedNametag = Nametag:Clone()
		ClonedNametag.Parent = game.Workspace:WaitForChild(player.Name).Head
		wait(0.1)
		ClonedNametag.Name.Text = player.Name
	end)
end)

Error: "ServerScriptService.NametagScript:8: attempt to index field 'Name' (a string value)"

4 comments

0

is there an object in ClonedNameTag called "Name"? because when you do ClonedNametag.Name it just gets the actual name of the object.

0

that might be because every object has a property called "Name"

0

Thanks

0

What I would do is give the player a custom nametag