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

Disabling player control for Cut Scenes?

Asked by 6 years ago

Is there a way I can disable Player control for a few seconds and re-enable control back.?

1 answer

Log in to vote
0
Answered by
DanzLua 2879 Moderation Voter Community Moderator
6 years ago
Edited 6 years ago

If your looking to stop the player from moving around and jumping while the camera is going through a cut scene you could set the character's Humanoid's Walkspeed and JumpPower both to 0 right before it begins,

character.Humanoid.WalkSpeed=0
character.Humanoid.JumpPower=0

Then when it ends you can set it back to the original values. You could record what they were before you changed them and set it to that recorded state

local w,j=character.Humanoid.WalkSpeed,character.Humanoid.JumpPower
character.Humanoid.WalkSpeed=0
character.Humanoid.JumpPower=0

--start here

--stop here

character.Humanoid.WalkSpeed=w
character.Humanoid.JumpPower=j
0
I want the player to be controlled via script, I want it to be able to walk. GeezuzFusion 200 — 6y
0
@GeezuzFustion your question was how to disable movement for a cut scene and reenable it after its done, this question answers that DanzLua 2879 — 6y
Ad

Answer this question