Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Why wont it work?

Basically what I am trying to do here is just to make a simple TextLabel say "NightWatch Tactical Agent " and there name but it WONT WORK.


local AgentTag = script.Parent["Agent name"]

game.Players.PlayerAdded:connect(function(plr)
AgentTag.Text = "NightWatch Tactical Agent "..plr.name
end)

1 comment

0

Lua is case sensitive. It's .Name not .name

1 answer

✓ Accepted answer

On line 4 you forgot to put parentheses around what the text should be. So instead of being "AgentTag.Text = "NightWatch Tactical Agent "..plr.name", it should be "AgentTag.Text = ("NightWatch Tactical Agent "..plr.Name)"

2 comments

0

Shouldn't make a difference.

0

oh thank you

This discussion is preserved as it was. New answers, comments, and votes are closed.