Hello,
I was tutoring today and the student wanted to go over admin command stuff. Which I thought would be pretty easy, I’ve developed a few admin commands back in the day. However when running the code the message being given by the Chatted event did not match up with the string being compared. Even when just copied and pasted directly into the chat. Anybody know why?
game.Players.PlayerAdded:Connect(function(player)
if CheckForAdmin(player) then
player.Chatted:Connect(function(message)
if message == "/guard me" then
print(message)
game.Workspace.Dummy:Destroy()
end
end
end)
end)
Notes: It is able to get past the ‘CheckForAdmin’ stage, it runs the Chatted event code, but it does not get past ‘if message == “/guard me” then’ and I can’t figure out why.
I know it’s case sensitive but it’s all lowercase. Even copying the string above and pasting it into chat doesn’t work.