Reuploading as nobody answered the first time.
game:GetService('RunService').Stepped:connect(function()
game.Players.LocalPlayer.Character.Head.Anchored = true
game.Players.LocalPlayer.Character.Torso.Anchored = true
game.Players.LocalPlayer.Character["Left Leg"].Anchored = true
game.Players.LocalPlayer.Character["Right Leg"].Anchored = true
game.Players.LocalPlayer.Character["Left Arm"].Anchored = true
game.Players.LocalPlayer.Character["Right Arm"].Anchored = true
end)
wait(0.1)
local hum = Instance.new("Humanoid", game.Players.LocalPlayer.Character)
wait(0.1)
game.Players.LocalPlayer.Character.HumanoidRootPart.Position = Vector3.new(game.Players.LocalPlayer.Character.HumanoidRootPart.Position.X, game.Players.LocalPlayer.Character.HumanoidRootPart.Position.Y, game.Players.LocalPlayer.Character.HumanoidRootPart.Position.Z + 2)
This script does not work as it should. I noticed when testing the game that if I used the 'Move' tool to move my HumanoidRootPart (all players parts were anchored and a new humanoid was made) it moved the HumanoidRootPart only when I use WASD / arrow keys, but none of the other parts. I was going to use this for a timefreeze feature in my game, so I did the same things in script, but for some reason, setting the position of it didn't do it, the part just wouldn't move. I am confused why it works with the move tool but not in script form, and if there is a fix, please answer with the fix, thanks in advance.

4 comments
so are you trying to get the players to not be able to move for a period of time?
Yea, the thing that moves as usual is the HumanoidRootPart.
I’m not completely sure what exactly you want but if you want to freeze the character you could just anchor all the parts?
I'll explain, you know how the player moves as usual? For example, if I was standing somewhere, I moved but my arms were frozen where they where before I moved. I would like that, just with the HumanoidRootPart instead of arms.