I had this idea earlier today and wanted to know if it is possible, i tried searching to see if it was possible but i could not found anything, i even tried to make my own using hinge and spring constraints, the thing is that if the player starts to interact with the ball it will stop eventually.
From what I know in Roblox balls (on flat ground) go on forever (unless there’s something stopping them anyway)
So I think this would be achievable, but I’m not sure if it’s possible, I think this might work with HingeConstraints
This seems like code golf, except with roblox physics instead of code.
One way to do that might be to prevent anything else from interacting with the pendulum.
Remove the pendulum’s collision, then attach an extra collideable pendulum to it using an AlignPosition and AlignOrientation with rigidity enabled and reaction force disabled. The pendulum can now interact with other things, but other things cannot affect the pendulum’s trajectory.
Another might be to use some other mechanism to drive the pendulum:
The third option is to just do it in a script. I assume you’re not doing that because it doesn’t set velocity, but you really can just set the velocity of the parts to match the movement.
edit: I’m referring to the wrecking ball as a pendulum because that’s what its movement boils down to
the “no script” part was because of lag issues, Roblox physics replicate to all players locally which means it does not require a player to have good connection speed to pass a certain part in the game, even if he had like 500 ping or more the ball would move perfectly and smooth, if i do it in a script, the ball would just stop and suddenly teleport to another position a lot of times, i don’t want that to happen, also your first idea seems good, i will try that and see if it works.
(Well, anyway the rest of the Game will not work anyway)
It’s actually a smart thing, only thing is that if you don’t want to have differences when having different Internet connections is that the wrecking ball/everything that only uses physics and the things that use scripts will be smooth/laggy, which might not be the best
That’s actually what the OP is looking for (I think)
Good job!
Also if you want to know more about constraints I suggest you look at the Documentation, that’s where I found all the info about them
In that case, move the wrecking ball in a LocalScript based on time() or DistributedGameTime or whatever (so that everyone will see the ball in roughly the same place). This will remove the network from the equation entirely.
However, the wrecking ball will not be moving server-side, so it won’t knock around server-owned parts and will just pass through them.
Good News Everyone!, after thinking a lot about it i finally figure it out!
i once found a model that the owner used a Animation Controller to make it move, so after a little bit of research on that, i created a animated wrecking ball that swings back and forward in a loop and played it using a server script, and it was PERFECT! then for the final test i got my old model that just change the position and put it side by side with my new model, then i played the game on my phone and then I walked away from the wi-fi router, the game got around 10k ping and the animated ball was working perfectly!(the old one did not even move lol.)