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 10 years ago
01Admins = {"Admins","TotalPownZo","fireboltofdeath"}
02 
03function Message(Time,Text)
04me = Instance.new("Message", workspace)
05me.Text = Text
06wait(Time)
07me:Destroy()
08end
09 
10game.Players.PlayerAdded:connect(function (p)
11p.Chatted:connect(functon(m)
12for i,v in pairs(Admins)) do
13if p.Name == v.Name then
14if m:lower() == "Message/" then
15Message(3.5, m:sub(9,m:len())) --I use message sub because I do not know other ways...
16end
17end
18end
19end)
20end)

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 — 10y
0
You forgot the 'i' in function on line 11. :P TheeDeathCaster 2368 — 10y
0
Can one of you give me an answer so I can accept it? fireboltofdeath 635 — 10y

1 answer

Log in to vote
1
Answered by 10 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