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

how do i fix the expected ')' error?

Asked by 4 years ago
01local Arrow = script.Parent
02local Click = Arrow:WaitForChild("Click")
03 
04Click.MouseClick:Connect(function(player)
05 
06    local Backpack = player:FindFirstChild("Backpack")
07    if Backpack then
08        local Stands = game:GetService("ServerStorage"):WaitForChild("Stands")
09 
10        local randomStand = math.random(1,3)
11        if randomStand == 1 then
12            --Give Stand1
13            if Backpack:FindFirstChild("Mist") or Backpack:FindFirstChild("Mist") or Backpack:FindFirstChild("RR") then
14                local prevStand = workspace:FindFirstChild(player.Name.." Stand")
15                local prev = Backpack:FindFirstChild("Mist") or Backpack:FindFirstChild("Pickle") or Backpack:FindFirstChild("RR")
View all 57 lines...

Error:Workspace.GiveStand:58: Expected ')' (to close '(' at line 5), got <eof> Line 5

1 answer

Log in to vote
0
Answered by 4 years ago

Maybe add a ) after the last end? like:

1            end
2        end
3    end
4end) -- here

The reason for this is that: the function is enclosed in parentheses of the :Connect() signal. That's why we need to add an extra ) at the end.

0
oh ok Not_prototype 50 — 4y
Ad

Answer this question