Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

My admin script doesn't work, can someone help?

Admins = {"Admins","TotalPownZo","fireboltofdeath"}

function Message(Time,Text)
me = Instance.new("Message", workspace)
me.Text = Text
wait(Time)
me:Destroy()
end

game.Players.PlayerAdded:connect(function (p)
p.Chatted:connect(functon(m)
for i,v in pairs(Admins)) do
if p.Name == v.Name then
if m:lower() == "Message/" then
Message(3.5, m:sub(9,m:len())) --I use message sub because I do not know other ways...
end
end
end
end)
end)

Output: 19:55:25.638 - Error in script: ')' expected (to close '(' at line 11) near 'for'

3 comments

0

You have an extra close parenthesis on line 12, actually.

0

You forgot the 'i' in function on line 11. :P

0

Can one of you give me an answer so I can accept it?

1 answer

✓ Accepted answer

You have an extra parenthesis. You should have seen the word Function turned blue if by any chance it was going to work. Like you did above (function (p) you needed to the same for (function (m). Also, you did forget the i in function.

This discussion is preserved as it was. New answers, comments, and votes are closed.