Hello! I have recently been working on a tower obby game with tools that can be used to sabotage other players. One of these tools is a bouncy ball that you can throw at people to knock them off of the obby. The only problem with it is that it always hits the person throwing the ball and knocks them off too. Does anyone know how to solve this? I’ve attached the relevant scripts below:
Here’s the script inside of the ball itself.
function trip(part)
script.Parent.Antigrav.Enabled = false
script.Parent.VectorForce.Enabled = false
part.Parent.Humanoid.Sit = true
part.Parent.Humanoid.Health -= 5
end
script.Parent.Touched:Connect(trip)
Here’s the script that goes inside of the tool.
function superball()
local ball = game:GetService("ServerStorage").assets.superball:Clone()
ball.Parent = game.Workspace
ball.Position = script.Parent.Handle.Position
ball.Orientation = script.Parent.Handle.Orientation
ball.VectorForce.Enabled = true
ball.Value.Name = script.Parent.Parent.Name
wait(0.05)
ball.CanCollide = true
ball.CanTouch = true
end
script.Parent.Activated:Connect(superball)
Any help would be greatly appreciated! Thank you!