Dodge Ball game Support!

https://gyazo.com/f796ed37bfb6ea30ed47740a329d2047

I made this ball script, Basically when i throw it and it lands i want it to bounce and to stop moving, but it keeps on moving until Debris() removes it, this is the code i got

print('{PlayerEventModule}: Line: '..debug.info(1,'l')..', Reached ThrowBall Keyframe Signal!')
				local BallClone = Ball.Handle:Clone()
				BallClone.CanCollide = true
				BallClone.Parent = workspace
				BallClone.CFrame = Ball.Handle.CFrame
				BallClone.CFrame = CFrame.new(BallClone.Position, mouseDirection)
				
				
				local BodyVelocity = Instance.new('BodyVelocity', BallClone)
				BodyVelocity.MaxForce = Vector3.new(BallThrowPower,BallThrowPower,BallThrowPower)
				BodyVelocity.Velocity = BallClone.CFrame.lookVector * 150
				Ball.Handle.Transparency = 1
				wait(.1)
				BodyVelocity:Destroy()
				Debris:AddItem(BallClone, 3.5)
				wait(BallThrowWait)

Any tips?, i want it to stop after it hits the ground, this just keeps moving, even after BV was desroyed!

2 Likes

i think u can use BallClone.Touched and when this funtion fired activate Anchored BallClone.Anchored = true

and one more thing don’t use wait(.1) instead use task.wait(.1) is more recommended

Anchor is gonna make it freeze in spot tho, not really what im looking for, i want it to stop moving, but if u touch it with character it still has moveability, not just straight locked in position

1 Like