I need help with this function error?
bin = script.Parent
Player = script.Parent.Parent.Parent
enabled = true
function onButton1Down(mouse)
if not enabled then
return
end
local player = game.Players.LocalPlayer
if player == nil then return end
enabled = false
LeftShoulder = Player.Character.Torso["Left Shoulder"]
RightShoulder = Player.Character.Torso["Right Shoulder"]
run = game:GetService("RunService")
for i = 1, 12 do
RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, 0, 0.14)
RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, -0, 0)
LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, 0, -0.14)
LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, -0, 0)
run.Stepped:wait(0.005)
end
game:GetService("Chat"):Chat(Player.Character.Head, "Water :O!")
x = Instance.new("Part")
x.BrickColor = BrickColor.new("Bright blue")
x.Transparency = 0
x.Size = Vector3.new(0, 0, 0)
x.TopSurface = "Smooth"
x.BottomSurface = "Smooth"
x.Shape = "Ball"
x.Name = Player.Name
x.CanCollide = false
z = Instance.new("SpecialMesh", x)
z.MeshId = "http://www.roblox.com/asset/?id=1051557"
z.Scale = Vector3.new(0,0,0)
fd = script.Firedamage:clone()
fd.Parent = x
td = script.Script:clone()
td.Parent = x
y = Instance.new("BodyVelocity")
y.maxForce = Vector3.new(math.huge, math.huge, math.huge)
y.velocity = Player.Character.Torso.CFrame.lookVector*200
x.Parent = Workspace
y.Parent = x
x.CFrame = Player.Character.Torso.CFrame*CFrame.new(0, 0, -10)
fd.Disabled = false
game.Debris:AddItem(x, 20)
for i = 1,70 do
x2 = Instance.new("Part")
x2.BrickColor = BrickColor.new("Cyan")
x2.Transparency = 0.5
x2.Size = Vector3.new(25, 25, 25)
x2.TopSurface = "Smooth"
x2.BottomSurface = "Smooth"
x2.Shape = "Block"
x2.CanCollide = false
x2.Anchored = true
x2.Name = Player.Name
fd = script.Firedamage:clone()
fd.Parent = x2
fd.Disabled = false
x2.CFrame = x.CFrame * CFrame.Angles(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10))
x2.Parent = game.Workspace
game.Debris:AddItem(x2, 0.4)
wait()
end
x:remove()
wait(o)
for i = 1, 12 do
RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, 0, 0)
RightShoulder.C0 = RightShoulder.C0 *CFrame.Angles(0, 0, -0.14)
LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, 0, 0)
LeftShoulder.C0 = LeftShoulder.C0 *CFrame.Angles(0, 0, 0.14)
run.Stepped:wait(0.01)
end
wait(7)
enabled = true
end
enabled = true
function onS(mouse)
mouse.Button1Down:connect(function() onButton1Down(mouse) end)
end
bin.Selected:connect(onS)