local Arrow = script.Parent
local Click = Arrow:WaitForChild("Click")
Click.MouseClick:Connect(function(player)
local Backpack = player:FindFirstChild("Backpack")
if Backpack then
local Stands = game:GetService("ServerStorage"):WaitForChild("Stands")
local randomStand = math.random(1,3)
if randomStand == 1 then
--Give Stand1
if Backpack:FindFirstChild("Mist") or Backpack:FindFirstChild("Mist") or Backpack:FindFirstChild("RR") then
local prevStand = workspace:FindFirstChild(player.Name.." Stand")
local prev = Backpack:FindFirstChild("Mist") or Backpack:FindFirstChild("Pickle") or Backpack:FindFirstChild("RR")
prevStand:Destroy()
prev:Destroy()
local Stand = Stands:FindFirstChild("Mist"):Clone()
Stand.Parent = Backpack
else
local Stand = Stands:FindFirstChild("Mist"):Clone()
Stand.Parent = Backpack
end
elseif randomStand == 2 then
--Give Stand2
if Backpack:FindFirstChild("Mist") or Backpack:FindFirstChild("Mist") or Backpack:FindFirstChild("RR") then
local prevStand = workspace:FindFirstChild(player.Name.." Stand")
local prev = Backpack:FindFirstChild("Mist") or Backpack:FindFirstChild("Mist") or Backpack:FindFirstChild("RR")
prevStand:Destroy()
prev:Destroy()
local Stand = Stands:FindFirstChild("RR"):Clone()
Stand.Parent = Backpack
else
local Stand = Stands:FindFirstChild("RR"):Clone()
Stand.Parent = Backpack
end
elseif randomStand == 3 then
--Give Stand3
if Backpack:FindFirstChild("Mist") or Backpack:FindFirstChild("RR") or Backpack:FindFirstChild("Pickle") then
local prevStand = workspace:FindFirstChild(player.Name.." Stand")
local prev = Backpack:FindFirstChild("Mist") or Backpack:FindFirstChild("RR") or Backpack:FindFirstChild("Pickle")
prevStand:Destroy()
prev:Destroy()
local Stand = Stands:FindFirstChild("Pickle"):Clone()
Stand.Parent = Backpack
else
local Stand = Stands:FindFirstChild("Pickle"):Clone()
Stand.Parent = Backpack
end
end
end
end
Error:Workspace.GiveStand:58: Expected ')' (to close '(' at line 5), got Line 5

1 comment
oh ok