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

Script doesn't recognize usernames if in all lowercase?

Hello! I have a whitelist script for my game. The problem is, it doesn't work unless the username is written with every capital letter in the username. For example, it wouldn't work if somebody's username is "RobloxGirl" and I put "robloxgirl" in the script. It just kicks the player if I don't put the name 100% correct. This is a pain because I have to type about 200 names for 2 whitelists, and it would suck to have to get everyone's exact username. I was wondering if there is any way to make it so that it doesn't kick them if their username isn't 100% including all the capitals, etc. any help would be greatly appreciated!

local usernames = {
   	 "trashijordi","MayaClouds",
	"iamsweeetgirl98","crossfithigh",
	"Edicista","tyleraiin",
	"alexiscorner","brettloaf",
	"aidenwhenE","breecause",
	"BellaLuxury","Aedificate",
	"marziqaa","LostCyborg008",
	"GrassRod123","Mia_Boo05",
}
game.Players.PlayerAdded:Connect(function(plr) 
	if not table.find(usernames, plr.Name) then 
		plr:Kick("Player not on the 1st reservation list")
	end
end)

2 comments

0

What if you just used UserID (they can change their name)?

0

it would be the same as just going to their profiles and copying their name basically

1 answer

✓ Accepted answer

you can make every letter in a string lowercase by using string.lower(string) hope this helped! tell me there are any errors

4 comments

0

thats not what im trying to do though?

0

what are u trying to do?

0

im saying u can use this to make the username be lowercase so u don't have to type in the upper case letters

0

Well It seems like Legend Answered your question...!

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