mentors = {"Enchanted4Dan","officialpm","AnuCat","Cald_fan","Alexoct"}
for i,v in ipairs(mentors) do
print(v..": "..plr.Name) -- so i can see if the values are the same, which they are
print(type(v)..": "..type(plr.Name)) -- so i can see if the value types are the same, which they are
if v:lower() == (plr.Name:lower()) then
print("success")
server.Remote.MakeGui(v,"MentorProgram",{
StudentsCards = StudentsCards,
MentorCards = MentorCards,
Player = plr
})
else
print(v.." and "..plr.Name.." are not equal") -- tells me they are not the same, when they are
end
end
when it prints it prints this, this for my name
:: Kronos :: Cald_fan : Cald_fan
:: Kronos :: string: string
:: Kronos :: Cald_fan and Cald_fan are not equal
why doesnt the if statement return true?

11 comments
Cald_fan and Cald_fan are not equal is getting printed outside the if statement so it will always print it no matter what, is it printing success?
i have to do it like that, if the if statement returns false it prints that
The print will run no mater if the statement runs use an else
well the statement still returns false
run print(v:lower() == plr.Name:lower())
i did that in the if statement
meaning it does string:lower() in the if statement
tbh I would never use name in the first place. Use the players id it is far better than checking for a name as a player can change their name.
then i have to use methods and do more stuff because i get this info from a trello board
Thats your call to make.
eh ill do it