Hello, i need to freeze a player for a certain amount of time which is 15 seconds. Is anchored = true on a players torso will work?
There are 3 main ways to do this although I'll only show you 2 as the other one isn't recommended.
Both ways will need the wait function - I'm assuming you are very new to scripting.
wait(howmanysecondsyouwantthemtowait)
So for the first method( the one you asked in the question) is anchored a players torso; this does work, but the player can jump around in the same spot and if you want them to completely be frozen you should use the 2nd method.
The 2nd method is to set the players walk speed and jumpower to 0 - completely freezing them) although they'll still be able to turn around.Walk speed and Jumpower are properties of a humanoid: exactly called WalkSpeed and JumpPower.
This is what both these methods look like:
Technically there is another way you could do this(not the one mentioned at the start) and that is doing both of these methods - anchored the torso and setting walkspeed and jumppower to 0: Both
-- Whichever method you chose. wait(15) --Turn the values back to normal e.g Player.Character.Humanoid.WalkSpeed = 16 Player.Character.Humanoid.JumpPower = 50
There you go you can now freeze a character.
if you want them absolutely stuck,
game.Players.LocalPlayer.PlayerScripts.ControlScript.Disabled = true wait(15) game.Players.LocalPlayer.PlayerScripts.ControlScript.Disabled = false