The ball is created, and it stays in front of me. It doesn't move forward like it should. It decides to stop working after about 2 shots. Sometimes one.
Player = game.Players.LocalPlayer Char = Player.Character Torso = Char.Torso Mouse = Player:GetMouse() Attack = false function onKeyDown(key) key = key:lower() if key == "f" and Attack == false then Attack = true local Ball = Instance.new("Part") Ball.Parent = workspace Ball.Shape = "Ball" Ball.Size = Vector3.new(5,5,5) Ball.BrickColor = BrickColor.new("Really red") Ball.Transparency = 0.4 Ball.TopSurface = 0 Ball.BottomSurface = 0 Ball.CFrame = Torso.CFrame * CFrame.new(0,0.5,-4) local Bv = Instance.new("BodyVelocity") Bv.Parent = Ball Bv.maxForce = Vector3.new(math.huge,math.huge,math.huge) Bv.P = 1250 Bv.velocity = Torso.CFrame.lookVector * 1000 game.Debris:AddItem(Ball,4) wait(3) Attack = false end end Mouse.KeyDown:connect(onKeyDown)
Since you parented the part to the Workspace before you added the BodyVelocity, it isn't being picked up by the physics engine. Move Ball.Parent = workspace
from line 11 to line 24 and it works.