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

How would I disable player control?

Asked by 7 years ago

So, this rather doesn't require me to post any code, since I know nothing about this subject.

I searched many sources but none worked. So to my problem:

I want to disable the control of a player (only 1 player), but not completely. The player still needs to be able to move by script so I can't anchor any parts of the player. Also, I can't disable ControlScript in PlayerScripts because it is for a cutscene, and when I re-enable it, the player starts moving toward a position I set him to move to during the cutscene.

So how exactly can I do this? Help is HIGHLY appreciated!

1 answer

Log in to vote
0
Answered by 7 years ago

There are many methods to do this.

The way I would personally do it to control 1 player is to make a LocalScript in PlayerStarterScripts that activates when an event (beginning of cutscene) is fired. You would anchor LocalPlayer.Character.Humanoid during the time you are doing the cutscene, then use CFrame and PrimaryPart to use the character itself.

That's my method, though.

0
I'm trying to shoot for the method of what Meepcity does with their entering houses/etc. system thehybrid576 294 — 7y
0
Also you can't anchor the humanoid? thehybrid576 294 — 7y
0
Yes, you can. Example: "repeat game.Players._.Character.HumanoidRootPart.Anchored = true until Anchor = false". Anchor can be a local variable (boolean) that you can set true/false depending on what you when you want. nforeman 15 — 7y
Ad

Answer this question