Why won't it change the text to the players name?
Nametag is a BillboardGui
local Nametag = game:GetService("ReplicatedStorage"):WaitForChild("Nametag") game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) print(player.Name) local ClonedNametag = Nametag:Clone() ClonedNametag.Parent = game.Workspace:WaitForChild(player.Name).Head ClonedNametag.Name.Text = player.Name end) end)
Error - Workspace.Scripts.NameTag:9: attempt to index field 'Name' (a string value)
I assume you have a TextLabel named "Name" in your billboardGui, Roblox is thinking that ClonedNametag.Name.Text
is referencing the Name of the BillBoardGui, and not the TextLabel, now BillBoardGui's Name doesnt have a Text property which is why you got the error
You can either rename textlabel or reference the textlabel correctly
local Nametag = game:GetService("ReplicatedStorage"):WaitForChild("Nametag") game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) print(player.Name) local ClonedNametag = Nametag:Clone() ClonedNametag.Parent = game.Workspace:WaitForChild(player.Name).Head ClonedNametag["Name"].Text = player.Name end) end)