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

How would I fix this problem?

Asked by
Rurith 10
10 years ago
local text = ("Your Name Is:...LocalPlayerName...")

My LocalScript is in a Text Button, which the Text Button is in a ScreenGUI in StarterGUI.

This is what I want it to do: It changes the ...LocalPlayerName... part to the player who is playing the game name. On the Text Button, I already put "Your Name Is:", but IDK how to make it so it makes the ...LocalPlayerName... part your name.

2 answers

Log in to vote
0
Answered by
jav2612 180
10 years ago

local text = "Your Name Is: "..LocalPlayerName

0
If you didn't define LocalPlayerName, then you should replace it with game.Players.LocalPlayer jav2612 180 — 10y
0
Doesn't work, it shows nothing (This is the code: local text = ("Your Name Is: "..game.Players.LocalPlayer) ) and these is the layout: http://gyazo.com/8b51dabcb929d3120205830cf5bad30b Rurith 10 — 10y
0
The correct code is local text = "Your Name Is: "..LocalPlayerName I didn't realize your mistake of using parenthesis at first. jav2612 180 — 10y
0
Oh okay, thanks! Rurith 10 — 10y
View all comments (2 more)
0
It still shows nothing q.q Rurith 10 — 10y
0
Thanks Rurith 10 — 10y
Ad
Log in to vote
0
Answered by 10 years ago
local text='Your name is: '..Game.Players.LocalPlayer.Name..'.';
print(text);

Answer this question