MovementHandler (Crouch, Sprint, Slide, Prone)

Hello fellow Developers!!

What is MovementHandler?

Today I am releasing my first open-source module, the MovementHandler!! Making things like Crouch, Sprint, Slide, Prone can be easy but kind of boring at the same time(because it’s easy). It is used very frequently in a lot of games. I am working on a FPS Framework as well, and I hadn’t really planned to make this, but my ego ate me up and I couldn’t bear watching games having these abilities but my framework not. So I took some time and made this. It is very very easy to use, and if you have some quality animations, you could get quite a lot out of this.

How to use it?

Basic Example:

local MovementProfile = require(game.ReplicatedStorage.MovementHandler.MovementHandler)

MovementProfile = MovementProfile:New({Player = game.Players.GiantDefender427})
MovementProfile:Initiate()
MovementProfile.Enabled = true

To use the animations provided in the Script itself, you will have to upload the animations to your account and then replace the AnimationIds in the Animation objects accordingly.

The script automatically adjusts if the character dies and respawns.

Abilities can be enabled and disabled, plus the whole profile itself.

Keybinds

  • Sprint - LeftShift
  • Crouch - C
  • Slide - C
  • Prone - C

License

Mozilla Public License 2.0

Permissions of this weak copyleft license are conditioned on making available source code of licensed files and modifications of those files under the same license (or in certain cases, one of the GNU licenses). Copyright and license notices must be preserved. Contributors provide an express grant of patent rights. However, a larger work using the licensed work may be distributed under different terms and without source code for files added in the larger work.

Read the full document here.

Download

Get it here
or from the GitHub Repository

You can also download the test place here

69 Likes

We cannot use this, it would be illagel, it has no license, and your permission only is not enough. A github version of this software would help…

4 Likes

If this has any mistakes do I have your permission to fix it up and tweak it?

2 Likes

i get

Infinite yield possible on 'ReplicatedStorage:WaitForChild("AcceleratorFramework")'  -  Studio
  19:35:58.602  Stack Begin  -  Studio
  19:35:58.602  Script 'ReplicatedStorage.MovementHandler', Line 9  -  Studio - MovementHandler:9
  19:35:58.603  Stack End  -  Studio

some thing is missing did you give it all

1 Like

Sorry I forgot to remove the FPS Framework integration, apologies

I’m on it thank you for your help.

Alright fix is up everyone and License has been added as well!!

Make sure to drop your feedback and any bugs or errors I made, this is my first open source project.

There are no Errors, but the animations are invisible to the other clients. You could use FireAllClients on a remote event or make a custom RBXScriptSignal to fire all the clients about the animation or MOST SIMPLE LOAD THE ANIMATIONS SERVER SIDE (may be performance draining in a server with like 50 players)

Did you start a LocalServer and check? Because I did.

1 Like

You really made this guy post an entire License agreement for a simple script :skull_and_crossbones:

45 Likes

This isn’t github, you can give you the code.

5 Likes

The animations might be invisible because you don’t own them. I’m pretty sure it’s a security feature.

@GiantDefender427 try setting these models on sale

https://www.roblox.com/library/7932218248/CrouchIdle
https://www.roblox.com/library/7932221054/CrouchWalk
https://www.roblox.com/library/7921074914/Slide

Also, a critique on the code:

image

Since this runs on the Client side, you can eliminate the Player parameter. Just say Player = game.Players.LocalPlayer since it doesn’t make sense to call this on any other player.

1 Like

Well those animations aren’t really high quality so i never thought people would want to be using them, but yes I can put it on sale no problem.

I have also included the Key frame sequence if you look inside the animation objects.

1 Like

oh sorry, i didn’t see that part of your post

It’s nice to have a LICENSE but realistically no one cares in Roblox development.

I believe if you have your code published to Roblox you’re stuck under specific conditions anyway.

4 Likes

Oh no I have 2 topics now what do I do?

1 Like

Update

I got some feedback from professional developers and I think they have a strong point, so I made a few changes. Now you can put the script in StarterPlayerScripts and that’s all, no worries if the character dies, script automatically adjusts.

1 Like

It doesn’t work even though I put my own animation only thing I changed in the script was
States.Crouch and States.Slide to True :man_shrugging:t5: can you please help me? Is there a way to change Keybinds and how would I configure a prone system in your script?

-- State

local States = {}

States.Sprint = false
States.Crouch = true
States.Slide = true

-- Load Animations

local CrouchIdleAnim = "rbxassetid://8087634282"
local CrouchWalkAnim = "rbxassetid://8087642001"
local SlideAnim = "nil"
Screenshots


image