how do i fix the expected ')' error?
01 | local Arrow = script.Parent |
02 | local Click = Arrow:WaitForChild( "Click" ) |
04 | Click.MouseClick:Connect( function (player) |
06 | local Backpack = player:FindFirstChild( "Backpack" ) |
08 | local Stands = game:GetService( "ServerStorage" ):WaitForChild( "Stands" ) |
10 | local randomStand = math.random( 1 , 3 ) |
11 | if randomStand = = 1 then |
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" ) |
19 | local Stand = Stands:FindFirstChild( "Mist" ):Clone() |
20 | Stand.Parent = Backpack |
22 | local Stand = Stands:FindFirstChild( "Mist" ):Clone() |
23 | Stand.Parent = Backpack |
26 | elseif randomStand = = 2 then |
28 | if Backpack:FindFirstChild( "Mist" ) or Backpack:FindFirstChild( "Mist" ) or Backpack:FindFirstChild( "RR" ) then |
29 | local prevStand = workspace:FindFirstChild(player.Name.. " Stand" ) |
30 | local prev = Backpack:FindFirstChild( "Mist" ) or Backpack:FindFirstChild( "Mist" ) or Backpack:FindFirstChild( "RR" ) |
34 | local Stand = Stands:FindFirstChild( "RR" ):Clone() |
35 | Stand.Parent = Backpack |
37 | local Stand = Stands:FindFirstChild( "RR" ):Clone() |
38 | Stand.Parent = Backpack |
41 | elseif randomStand = = 3 then |
43 | if Backpack:FindFirstChild( "Mist" ) or Backpack:FindFirstChild( "RR" ) or Backpack:FindFirstChild( "Pickle" ) then |
44 | local prevStand = workspace:FindFirstChild(player.Name.. " Stand" ) |
45 | local prev = Backpack:FindFirstChild( "Mist" ) or Backpack:FindFirstChild( "RR" ) or Backpack:FindFirstChild( "Pickle" ) |
49 | local Stand = Stands:FindFirstChild( "Pickle" ):Clone() |
50 | Stand.Parent = Backpack |
52 | local Stand = Stands:FindFirstChild( "Pickle" ):Clone() |
53 | Stand.Parent = Backpack |
Error:Workspace.GiveStand:58: Expected ')' (to close '(' at line 5), got <eof>
Line 5