Ad
Still have questions? Join our Discord server and get real time help.
Log in to vote
2

How to make a ball roll in the direction one is facing?

Asked by
Fifkee 2017 Administrator Moderation Voter Community Moderator
2 years ago
Edited 2 years ago

I have NO idea how to do this. None at all.

What I attempted was to use a bodyvelocity and get the direction it was moving, but as you can probably tell.. no workie. I also tried using a bodyforce to make it roll around.

See, I could use a bodyposition, but I want the ball to keep all it's gravitational capabilities. I have no idea how to replicate this.

Anybody have an idea on how to do it it?

I DON'T NEED YOU TO DO IT FOR ME. I JUST NEED A SUGGESTION ON HOW I COULD ACCOMPLISH THIS. THANK YOU.

oh, and I'm also making the bubble bowl from spongebob. link here. thanks.

1 answer

Log in to vote
1
Answered by 2 years ago

Use the lookVector of the character's HumanoidRootPart, then multiply that by whatever speed you want to give it.

local angle = character.HumanoidRootPart.CFrame.lookVector

If you want it to keep its gravitational capacities, just change the Velocity of the part. I don't think any BodyMovers would be required.

part.Velocity = angle * 1000 -- as an example
1
You're the best! :D Fifkee 2017 — 2y
Ad

Answer this question