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

How would you lock/anchor the player so they can't move? For ex: when i have a cutscene.

Asked by 5 years ago
Edited 5 years ago

How would you anchor the player so they can't move. I tried

game.Players.LocalPlayer.Character.Anchored = true

but it dosen't work how would you do this?

0
You need to anchor individual parts of the character. Also, I prefer just setting JumpPower and WalkSpeed to 0 instead so the idle animation still plays but it is ultimately up to you. Rheines 661 — 5y
0
oh, din't think of that Thank You Rheines Freddan2006YT 88 — 5y
0
Just remember to store the values! GamingZacharyC 152 — 5y

2 answers

Log in to vote
0
Answered by 5 years ago

If you are using different rigs (e.g. R6, R15, Rthro), then you must only anchor the one thing they all have in common HumanoidRootPart

game.LocalPlayer.Character.HumanoidRootPart.Anchored = true
1
R15 and R-Thro are actually both the same rig. R-Thro is just a more well-defined R15 series than R15 itself. DeceptiveCaster 3761 — 5y
Ad
Log in to vote
0
Answered by 5 years ago

Well if you are making a cutscene it is better to remove the player from the Scene or Workspace. We do this by doing in a localscript game.Players.LocalPlayer.Character.Parent = game.ReplicatedStorage.

What it does it, it gets the player element then resets it's parent to the games storage. We can put it back in the scene by simply changing the value back to workspace.

This is better as players won't see the player and the player won't move. If you really want it to stop moving make it's root part anchored. This will stop it from moving.

Answer this question