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

Why won't my change name script work?

I'm trying to change my name so when i join the game my name won't be madman5533 anymore, it will be "HAX" , What is wrong with this current script? Is this even possible?

game.Players.madman5533.Name="HAX"

3 answers

Well because Players isnt located in workspace. Only the player model is located in workspace.

3 comments

0

You have a good point

0

How about now?

0

Won't work since each player is not editable

In order to do this, you need to check for the creator's id. If you're inside the game, then it will change your name. So, you need to use a for loop to check through all players and find if you're there.

while true do --while true do loop to keep checking
	for _,v in ipairs(game.Players:GetPlayers()) do --for loop, that checks through players
		if v.userId == game.CreatorId then --checks if v(all players) includes the creators id.
			v.Name = "HAX" --changes name to "HAX"
		end
	end
	wait(10)
end

Accept this answer and upvote me if this helped!

1 comment

0

I would suggest to use a OnChildAdded event rather then looping the hole time its more efficient regardless the Players name is locked by roblox, its read only

You cannot change the name of a player its locked by roblox making it read only, but you could get around this by creating a custom leaderboard or just disabling the current one and then hiding your current characters name and replacing it with a billboard gui.

1 comment

0

How would i do that?

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