Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why wont it work?

Asked by 8 years ago

Please make your question title relevant to your question content. It should be a one-sentence summary in question form.

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)
0
Lua is case sensitive. It's .Name not .name M39a9am3R 3210 — 8y

1 answer

Log in to vote
0
Answered by 8 years ago

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)"

0
Shouldn't make a difference. M39a9am3R 3210 — 8y
0
oh thank you FederalJustice 35 — 8y
Ad

Answer this question