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

How would I disable player control?

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

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.

3 comments

0

I'm trying to shoot for the method of what Meepcity does with their entering houses/etc. system

0

Also you can't anchor the humanoid?

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.

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