I'm trying to make it compare to a string, and ignore capitals ie:
I LIKE HOTDOGS
then compares to I like hotdogs
and because it's the same words and ignoring upper or lower case it will continue
game.Players.PlayerAdded:connect(function(plr) local defined = {} plr.Chatted:connect(function(msg) if admins[plr.Name] then if msg == --[[????]] then --Checks to see if the message is the same word, ignoring capitals completely local target = string.gsub(msg,"Sanic:","") if game.Players:FindFirstChild(target) then if game.Workspace[target]:FindFirstChild("Humanoid") then if game.Workspace[target]:FindFirstChild("Torso") then local sclone = script.Sets.Sonic:Clone() sclone.Parent = game.Players[target].Character.Torso sclone.Enabled = true end end end end end end) end)
lol1 = "LOL" -- all is capital lol2 = "lOl" -- only o is captial if lol1:lower() == lol2:lower() then print("Works") end
:lower() makes all string lowered so :lower() makes both string lower cased able to compare.