✓ Accepted answer
Several problems here.
First, you should do the PlayerAdded event instead of ChildAdded.
Second, I'm not even sure that Chatted events HAVE a speaker parameter, but even if they do, you never used it and it's easier to just use player of the PlayerAdded event.
Third, you should should check if the new player that joined the game is an admin, and THEN connect the chatted event, instead of connecting the event to every player and checking if they're an admin after they chat.
Fourth, it would be better to put the for loop in an extra function. Although this is not necessary, it is cleaner.
Fifth, you should use 1 if statement and an elseif instead of two if statements.
Sixth, on line 14 you are basically looking for nothing. FindFirstChild() takes one argument, which is the child you are trying to find.
Here's my edited version of your script.
Permission = {"MasterAzzer"}
function isAdmin(name)
for i,v in pairs(Permission) do
if v:lower() == name:lower() then
return true
end
end
return false
end
game.Players.PlayerAdded:connect(function(plr)
if isAdmin(plr.Name) == true then
plr.Chatted:connect(function(msg)
if msg:lower() == "fire" then
local f = Instance.new("Fire",plr.Character.Torso)
elseif msg:lower() == "unfire" then
local f = plr.Character.Torso:FindFirstChild("Fire")
if f then
f:Destroy()
end
end
end)
end
end)