Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to Stop Movement of Humaniod?

Asked by
22To 70
9 years ago

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

Log in to vote
0
Answered by
Goulstem 8144 Badge of Merit Moderation Voter Administrator Community Moderator
9 years ago

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]);
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 22To 70 — 9y
0
Then set plr as game.Players.LocalPlayer in a localscript Goulstem 8144 — 9y
Ad

Answer this question