How to go about making a shove system?

I’m a pretty new scripter and I want to go about making a shove system for my game. I want the player to be able to push other players. If anybody could give me some pointers or link a tutorial that would be greatly appreciated.

How do you want the shove system to work?

If you click a button, like the f key, you play an animation that makes it look like your shoving someone, and anybody in front of you when you do that gets pushed backwards.

After understanding the differences between server scripts and client scripts:

First you want to be able to register keyboard events. Look into either the Mouse object from Player:GetMouse(), or look into UserInputService.

Next, you will want to be able to make and play animations.

To do the actual shoving part, it must be done on the server. Look into RemoteEvent in order to communicate with the server from the client when the client presses a key.

And finally, do to the actual shoving on the server, my suggestion is to set the Humanoid’s PlatformStand to true, then apply a Velocity to the Humanoid’s Root Part in the correct direction.

Good luck.

It seems that some people were using BodyVelocity or something to move players from another player. I’m not quite accurate how it works, but my friend has worked on something like that.

What would be the best way to check if the player doing the pushing is touching the player getting pushed?

Where would you apply the BodyVelocity?

I’ve made the animation part with Ninja_Deer’s advice, I just need to make the part where it apply’s force to the person getting pushed, and I have no idea how to do that.