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

Change name for rp purposes but it says global player is a nil value. what did i do wrong?

script.Parent.MouseButton1Click:connect(function()
	player.Character.Name = script.Parent.Parent.TextBox.Text
end)

it doesnt like player whatd do i put instead

1 answer

✓ Accepted answer

Well you never actually define player in this script. All you would need to do is put this in a local script if it isn’t already in one and make a variable of that for the player like this:

player = game.Players.LocalPlayer

Simple as that, hope I helped.

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