So basically I have a folder in replicatedstorage with a folder called developers in it and inside that two int values with 0.
devs = game.ReplicatedStorage.Admins.Developers
owners = game.ReplicatedStorage.Admins.Owners
admins = game.ReplicatedStorage.Admins.Admins
mods = game.ReplicatedStorage.Admins.Mods
prefix = ":"
function findPlayer(name)
for _, player in ipairs(game.Players:GetPlayers()) do
if player.Name:lower() == name:lower() then
return player
end
end
end
function onChatted(message, player)
for i,v in pairs(devs:GetChildren()) do
if message:sub(1, 2) == prefix.."M" or prefix.."m" and player.UserId == v.Value then
print("Works!")
end
end
end
game.Players.PlayerAdded:connect(function(player)
player.Chatted:connect(function(message) onChatted(message, player) end)
end)
The problem is it shouldn't print "Works!" if the value of the int ~= my userid.
