Is there a way to change the "walk force" of the player?

I looked around on the wiki to see if there was a Humanoid property for what I needed.
Also, I am posting this in Scripting Support becuse I don’t know if the solution requires a custom script, or if it can be done by modifying a property I have not found yet. So I will remove this post if this isn’t the appropriate place.

But to clarify my question:
I have experimented with attaching ropes to the player and other blocks of varying masses. And I’ve found that in some situations, it can be difficult for the player to pull an object with a considerably low mass, up medium hill.
So I wanted to find the simplest way to increase the “max force” of the player so it didn’t struggle as much with pulling certain objects up slopes, without modifying the mass of the object being pulled.

Chances are, this is going to boil down to a custom script on the player character, but I wanted to hear if anyone else had experience with this.

1 Like

Do you mean Humanoid.WalkSpeed?
If yes then (place as a localscript in starterplayer → startercharacterscripts):

local Character = script.Parent
local Humanoid = Character:WaitForChild("Humanoid")

while true do
        print(Humanoid.WalkSpeed)
        task.wait()
end

If you wan’t to get the precise player speed (how fast player runs) then do this:
place as a localscript in starterplayer → startercharacterscripts:

local Character = script.Parent
local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")

local function getSpeed()
        return HumanoidRootPart.Velocity.Magnitude
end

while task.wait() do
       print(string.format("%s's speed is: %.2f!", Character.Name, getSpeed())
end

You can also access these speeds from the server, however humanoid.WalkSpeed will have different values (usually you will see “16” if you haven’t edited it)

just change the player’s body parts density

1 Like

Nope. Not speed, force.

A force needs to be applied to the player in order to get it to a certain speed.

I will try this and see what happens.

It’s a bit of a hacky solution, but might work well.

I just tested this today.

At first, I assumed you meant I should decrease the body part’s density, which made it worse.
But then I also tried increasing the body part’s density, and that actually did the trick, surprisingly.
But it kinda makes sence, because I guess the player’s movement logic needs to apply more force to get it moving.

Though, I am also curious if other people have made custom scripts before to attach a vector force constraint to the player to add force without making the player heavier.

You’d need to use either

VectorForce: (Recommended)

LinearVelocity:

BodyForce: (Not recommended as its deprecated)

1 Like

I ended up doing a variation on your suggestion. Which also still float in water.
I made a character script to attaches a new part to the player to give it extra mass.

image

The part has all collision flags turned off so it doesn’t mess with anything.
But the part adds mass to the player so the internal moving logic now applies more force.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.