The problem with this method is that it doesn’t work for mobile players, and that sometimes when you walk and get disabled by this, it makes you walk in that direction and you can’t stop.
Controls method:
local controls = require(game:GetService("Players").LocalPlayer.PlayerScripts.PlayerModule):GetControls()
controls:Disable()
wait(3)
controls:Enable(true)
The problem with this method is when you respawn your controls are disabled and you can’t enable them back.
What other method can I use to disable the player other than these methods, or am I doing something wrong?
I’ve always just anchored the player’s HumanoidRootPart. It’s the easiest way that I know of. The only issue with it is that exploiters can thaw themselves.
The API I provided in combination with CAS method should ensure that the players are not moving when the parameter assigned is Vector3.new(0, 0, 0). By not moving, you force them to stand still. If that API doesn’t work for reasons of replication, use this one as an alternative:
To pop onto the bandwaggon - wouldn’t letting the player falling down to the floor then anchoring the HumanoidRootPart be a solution? If there is a concern about hackers “unthawing” themself, then a simple while true do statement would work aswell. Just my thoughts though
I don’t want to do that, I have other scripts that slow down the player, instead I would do
humanoid.WalkSpeed - 16, BUT, if the player is 16 walkspeed or more than they can still walk and I just wanna avoid using walkspeed because I have classes that slow players then give their speed back
Maybe trying to disable the script for the player movement. Like This:
local controls = require(game.Players:GetPlayerFromCharacter(--[[what you use for the attack]]).PlayerScripts.PlayerModule):GetControls()
controls:Disable()