I am working on a soccer game where players have a ball welded to them when they have possession. When they pass or shoot I used body velocity to move the ball but in game it looks so bad and glitchy does anyone know how I might make this look better.
You could use AssemblyLinearVelocity
try setting the network owner to the shooter
whats that I never heard of that
https://developer.roblox.com/en-us/api-reference/property/BasePart/AssemblyLinearVelocity
It’s a decent way to move it ig but setting the network owner to the shooter might be better (as stated by @iam13robloxexactly
Well, there are mutliple ways you could do this, one would be using properties which have already been implemented by Roblox such as AssemblyLinearVelocity (mentioned above), this method doesn’t really require much knowledge of maths/physics but, it can be a bit buggy/glitchy if not implemented correctly (I’ve played games which use properties which have already been implemented by Roblox and, they’re surprisingly smooth).
Another way would be to use TweenService, this will allow you to have really smooth animations but, you’re limited to the ball moving in one direction (as far as I know);
alternatively, you could manually interpolate the ball along a predetermined path by using kinematic equations (and possibly bezier curves but, you could still do this without the use of bezier curves), this in my opinion, will require the most knowledge and some problem solving skills but, the outcome will most likely be much better than all the methods stated above.
Since the ball can be stopped by a player, you could raycast to check if someone is in the way of the ball, if someone is in the way, you can have to bounce off the player or, the player could yield the ball, since bezier curves aren’t needed, you could use a module known as Fast Cast; while you won’t be making weapons, the concept is pretty similar.
Note: These probably aren’t all the possible ways to achieve your goal, these are just some possible solutions.
what about setting the network owner as a couple other people have said.
Setting the network ownership of the ball should increase responsiveness for whoever has network ownership but, depending on the players ping, it could make the ball more laggy; I’d advise against setting the network ownership of a ball to a player unless you’re doing sanity checks, for responsiveness, every player could have their own ball instance on their client which will respond to what they do (or what another player does) but, the client shouldn’t be trusted since an exploiter could teleport the ball anywhere they want (assuming no sanity checks are done) as their client will do physics calculations and send the results to the server.