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

How to Stop Movement of Humaniod?

I made a welcome Gui but i want it to freeze that player until it finished load\

here is script

Gui = script.Parent.Parent

while true do 
wait(49)
script.Parent:TweenPosition(UDim2.new(-2,0,-5,0), "In", "Back", 1,true)
end

1 answer

✓ Accepted answer

If you mean like the player is walking and you wanna stop them in their place.. then you need to use the MoveTo method on the player's Character's Humanoid. With an argument of your Character's Torso.

local plr = "Goulstem"

workspace[plr].Humanoid:MoveTo(workspace[plr].Torso.Position);

Otherwise, you can anchor either the Character's torso or all of their limbs, if you do the latter they cannot move at all while if it were just to be the torso leg and arm animations will play.

local plr = "Goulstem"

function anchorModel(model)
	for i,v in pairs(model:GetChildren()) do
		if v:IsA('BasePart') then
			v.Anchored = true
		end
		anchorModel(v)
	end
end

anchorAll(workspace[plr]);

2 comments

0

by "local plr" it will only freeze one person? I want it able liek when they join and the gui is loading up they cant be able to move around while its loading

0

Then set plr as game.Players.LocalPlayer in a localscript

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