Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 9 years ago
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'

0
You have an extra close parenthesis on line 12, actually. GoldenPhysics 474 — 9y
0
You forgot the 'i' in function on line 11. :P TheeDeathCaster 2368 — 9y
0
Can one of you give me an answer so I can accept it? fireboltofdeath 635 — 9y

1 answer

Log in to vote
1
Answered by 9 years ago

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.

Ad

Answer this question