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

I need help with this function error?

Asked by 9 years ago
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)
0
Please put *all* of this code within a single Lua block (the squiggly lines) or we can't read it. Also, what error are you getting? Just posting code doesn't help us. adark 5487 — 9y
0
14:05:25.362 - Selected is not a valid member of Backpack 14:05:25.364 - Script 'Players.Player.Backpack.Script', Line 87 14:05:25.365 - Stack End 14:05:25.366 - Touched is not a valid member of LocalScript 14:05:25.367 - Script 'Players.Player.Backpack.Water :o!.LocalScript.Firedamage', Line 17 14:05:25.368 - Stack End 14:05:25.369 - Touched is not a valid member of LocalScript 14:05:25.370 - Scr Jazzycoolivan15 0 — 9y

Answer this question