Now I'm trying to making lua effect only effect for player with specific name... I tried, but it's hard, maybe someone have idea how to do that, or it's impossible?
if string.find(string.lower(player.name), "name here")
--do stuff--
"name here" must be between quotes and all in lowercase letters, as string.lower checks for the player's name all in lowercase letters to ignore all random uppercases it could have.
if string.find(string.lower(player.name), "name here")
--do stuff--
"name here" must be between quotes and all in lowercase letters, as string.lower checks for the player's name all in lowercase letters to ignore all random uppercases it could have.
I don't know if you really need string.find in this case, that's for finding a specific bunch of characters in a given string mostly (e.g. if you were looking for "sonic" and a player's name was "sonicfan" Lat's code would run, because "sonic" is part of the name even though other letters follow it). If you wanted it only to work if the player has that exact name (but still with string.lower to make it case insensitive) you could just use:
Code:
if string.lower(player.name) == "name here"
do stuff
end
Last edited:
Status
Not open for further replies.
Who is viewing this thread (Total: 1, Members: 0, Guests: 1)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.