Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How to Enable player movement?

So I have a script that disables the movement. But how would I enable this again?

Here is what I have tried:

wait(4.5)
game.Players.LocalPlayer.Character.Humanoid.Died:Connect(function()
	local controls = require(game.Players.LocalPlayer.PlayerScripts.PlayerModule):GetControls()
	controls:Enable()
end)

It kept erroring saying PlayerScripts is not a valid member of player. Please help!

5 comments

0

can't you just change the walkspeed?

0

But then they could jump.

0

But I could change walkspeed and jumppower! Thanks lol.

0

np

0

im just gonna put as an answer so others can see lol

1 answer

✓ Accepted answer

You can just change the walkspeed and the jump power

local player = game.Players.LocalPlayer
local humanoid = player.Character:WaitForChild('Humanoid')

humanoid.WalkSpeed = 0 --default 16
humanoid.JumpPower = 0 --default 50

This discussion is preserved as it was. New answers, comments, and votes are closed.