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

Is there a way to compare PlayerNames with a bool?

This doesn't seem to work for me, and yes it's in a LocalScript

Player = game.Players.LocalPlayer

Name = Player.Name

if Name = "Builderman" then print ("Welcome Builderman")

1 answer

✓ Accepted answer

Your question doesn't really sum up what you want, but I will fix your code.

Your syntax is incorrect meaning you used an = sign, this is only to set a value, if you want to compare a value in Lua, you use 2 equal signs like this== Also, you forgot and end at well, the end... Fixed code bellow:

Player = game.Players.LocalPlayer

Name = Player.Name

if Name == "Builderman" then 
	print ("Welcome Builderman") 
end

--Keep in mind your name is not Builderman so this wont work for you, obviously

If this helped, accept this answer! Any questions/Problems? Comment them bellow

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