Scattering Ball

Hello, here I am programming a football game and I noticed that when I kick the ball, the ball starts to move away from me, I would like to know if it was possible that when I kick the ball, I Wish he didn’t have it scatter all over the field, because I’ve already done a tool pass for long passes. Can you help me ? maybe the ball needs some force? a script ?

robloxapp-20220611-1349347.wmv (2.3 MB)

Thanks.

Yes. You can use BodyGyro!
Once you have added the BodyGyro into the ball, you have to set these properties.
Set the property ‘D’ to 0.5
Set the property ‘MaxTorque’ to 25, 25, 25
Set the property ‘P’ to 0

Hope i helped.

1 Like

Are you talking about AlignOrientation ? Because I believe he was replaced. for future work.

BodyGyro is deprecated. But it works the best for me. A lot of popular soccer games use it.
It’s extremely simple to use, and works just fine.

How could I use it for new works, because I can’t find it.

You can use Instance.new(“BodyGyro”,workspace) to make one.

How can I create this, with a script? I don’t know script , well a little bit.

You can use the roblox ‘run’ command bar, and insert the script.


Or you can get this:

Thank you very much, it works very well.

robloxapp-20220611-1754219.wmv (2.4 MB)

1 Like