Simple Humanoid Movement Modulescript | Supports Attributes

Hey, developers. I’ve realized how annoying it is to keep track of calculations when changing the player’s walkspeed/jumppower. This is especially annoying when multiple scripts change the player’s movement.

There is a solution that provides a more organized, and less hacky way.

Here is an example of what the module can provide:

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local ModuleScript = require(ReplicatedStorage.ModuleScript)

game.Players.PlayerAdded:Connect(function(plr)
	local newMovement = ModuleScript.new(plr)
	newMovement:SetSpeed(16)
	newMovement:Update()
end)

If you have multiple scripts, you can use the cache systems. This makes it much easier and simpler since you don’t need to create new movements each time.

local cacheMovement = ModuleScript:GetCache(plr) -- returns original movement or nil
cacheMovement:SetSpeed(16)
cacheMovement:Update()

There are also ways to use it for attributes.

If you want to use it and learn more about the docs, please visit the GitHub page.

4 Likes

This is very useful and keeps track of the movement speed quite well. Thank you for this resource. :+1:

If you take suggestions, is it possible if this could be extended to support attribute stats as well? I am working on a project that affects damage multiplication and other stat multipliers, and this is a very consistent and efficient way to keep the stats consistent when modifying them. :thinking:

If not that’s okay, but aside from that. Thank you for your contribution to the forum! :slight_smile:

1 Like

Looks cool, how about an example place editable, with jump + pads, jump - pads , set back to orginal and same with speed? :slight_smile:

1 Like

I took your suggestion into thought, and liked it.

I’ve just added support for attributes with documentation on how to use them.

1 Like

Amazing! :grin:

Thank you so much for taking my suggestion, this will be very helpful for all stat attributes. Much appreciated. :pray:

1 Like