Im making a system that makes the ball go in the direction u hit it, but if u go on top of the ball, it doesn’t go anywhere.
local angle = (ball.Position - part.Position).Unit
I know I sound a little confusing, but im trying to make it so that if u hit a ball even if ur 0.2 studs off the middle, it’s not gonna only move a little but, but it will move the farthest length for your angle
local direction = ball.Position - part.Position
local horizontalDirection = Vector3.new(direction.X, 0, direction.Z).Unit
if horizontalDirection == Vector3.zero then
direction = part.CFrame.LookVector
horizontalDirection = Vector3.new(direction.X, 0, direction.Z).Unit
end