I need to keep my player completely still but I cant just anchor it's torso. Is there any other way to do this?
NOTE: I also can't anchor anything welded to it, so welding a part to the torso and then anchoring wont work.
I need to keep my player completely still but I cant just anchor it's torso. Is there any other way to do this?
NOTE: I also can't anchor anything welded to it, so welding a part to the torso and then anchoring wont work.
I might consider the use of a BodyPosition then, if you can't anchor Parts. As a simple demonstration:
local p = game.Players.LocalPlayer; --Defines the player (assuming this is in a LocalScript)
local torso = p.Character:findFirstChild("Torso");
function stopPlayer()
local bp = Instance.new("BodyPosition");
bp.Position = torso.Position;
bp.Parent = torso;
end
function releasePlayer()
local bp = torso:findFirstChild("BodyPosition");
if bp ~= nil then bp:Destroy() end
end
Thank you.
the answer is simple, change the player.character.Humanoid walkspeed to 0.
You could, as suggested, turn the walkspeed to 0, or alternatively, you could make a small function in the StarterPlayerScript's ControlScript, which will disable the character from moving (Walking,Jumping, ect). One thing to note, is that if you are after a completely still torso, you will need to stop the animations running, as one of the default idle animations has the torso bouncing up and down.
This discussion is preserved as it was. New answers, comments, and votes are closed.
3 comments
Set their walkspeed, in the humanoid properties, to 0.
Hold up... You understand welds but not properties of the humanoid?
Even if the walkspeed is 0 the player can still be flung by other object :/