Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Is it possible to do this? math & velocity

I have a ball that moves using the equation: BodyVelocity.Velocity = workspace.Ai.HumanoidRootPart.CFrame.lookVector * 60

it moves perfectly

but is there anyway to detect when the ball reaches the location of the velocity? sort of like a ReachedTarget in BodyPositioning except for BodyVelocity? or at least be able to detect if the ball has already gone across its velocity target?

2 comments

1

Keep checking how far the position of the ball is from the target. print((Ball.Position - workspace.Ai.HumanoidRootPart.Position).magnitude)

1

o true, thanks, put this as an answer so I can give you the answer

1 answer

✓ Accepted answer

Keep checking how far the position of the ball is from the target.

print((Ball.Position - workspace.Ai.HumanoidRootPart.Position).magnitude)

I'm pretty new to this site, but I'm trying to only post as answers when I feel I give a solid answer, not just like 'ooh, try this', if you know what I mean.

I'm pretty sure that there's a more efficient way to do this.

1 comment

1

Thank you

This discussion is preserved as it was. New answers, comments, and votes are closed.