Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What's a way to bring a character a distance by force? (Solved)

Asked by
pidgey 548 Moderation Voter
4 years ago
Edited 4 years ago

I am asking this question because there's a lot of answers, however none of them that I tried work well. I want to force a character to move x studs over a period of time, This can be done by using a for loop and changing the character's CFrame, except that if I do that, the character won't account for gravity - that's what I'm looking for. So, obviously I want to be working with something like a BodyForce, however: BodyForce is really unpredictable because of all the different parts with different physical properties (friction) cause the force to actually have little/huge impact depending on the character's situation, https://i.imgur.com/lhZAIVV.gifv therefor making it almost impossible to make a calculation of force required to move x distance in a period of time. How would I actually force a character a distance in a set period of time while still account for gravity??? Any answers would be appreciated.

1 answer

Log in to vote
0
Answered by
pidgey 548 Moderation Voter
4 years ago

I solved this with BodyVelocity using a high Power and MaxForce. If you set the Velocity Y's force to be 0, character's will not apply any extra force up or down (thus following gravity). Result - no keyboard input was used here to move the character, just BodyVelocity

Ad

Answer this question