Disable user control over them avatar

Is there any way that I can lock the player’s control over their avatar? I want to make a cutscene with the avatar blocked but I don’t want to anchor the HumanoidRootPart or set the WalkSpeed to 0.

Instead of using the players character for the cutscene, get a clone of it instead and teleport the main character away and freeze them so you can use the clone to make the cutscene.

Why not? Those sound very useful, you could just revert the changes after the cutscene is done playing.

1 Like

Once I unanchor, the character animations and the characters jumping glitch. Regarding the walking speed, sometimes I may want to make the NPC walk during the cutscene.

I thought about that, however doing every cutscene is tiring, I prefer a way just to disable the player’s movement.

I am not good at scripting, but I heard you could disable the user’s control and keybinds from controlling their character. Try checking out ContextActionService, not too sure but that could be a hint.

After I would have to enable it all again since I had to do the :Unbind() function. It would also be too much just for a simple cutscene.

I don’t think there’s any other simpler choice, you can either use the ideas you just mentioned in your post,

using @changeno’s method,

or use my idea:

These are my best solution based on my current basic scripting knowledge. You could wait for a more advanced scripter to come and give the best solution among all I’ve just mentioned.

1 Like

Thanks, I’m an advanced scripter however I never went into player control.

1 Like

Got a solution!

local LocalPlayer = game:GetService("Players").LocalPlayer
local Controls = require(LocalPlayer.PlayerScripts:WaitForChild("PlayerModule")):GetControls()

Controls:Disable()

I forgot about that module’s existence lol.

1 Like
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")

humanoid.AutoRotate = false
humanoid.WalkSpeed = 0
humanoid.JumpPower = 0
humanoid.PlatformStand = true

player.PlayerGui.ChildAdded:Connect(function(gui)
    gui.Enabled = false
end)

player.PlayerGui.ChildRemoved:Connect(function(gui)
    gui.Enabled = true
end)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.