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

Is there a way to disable player control WITHOUT setting the WalkSpeed to 0?

So, I've created a cutscene where players walk in, but I don't want them to DIRECTLY control the character, since I'm just using Humanoid:MoveTo() to walk them to the place I want them to go. But I've looked on many websites, and I can't seem to find a solution to this problem.

If anyone knows a solution to this, I would be happy to hear it.

Thanks!

3 comments

0

So then all I would have to do to connect it back is to bind it back?

0

Yep. For more info about this i would look at the Roblox scripts.

1 answer

✓ Accepted answer

Hey PickUpTheBeat1,

What you are trying to do is very simple. All you need to do is just disable the ControlScript, which is located under PlayerScripts, which is under the Player. Then, you enable it when you want them to be able to control the character.

####Here is an example:

local plrs = game:GetService("Players");
local plr = plrs.LocalPlayer;

function turn_it_off(plr)
	
	local plr_srps = plr:WaitForChild("PlayerScripts");
	local control = plr_srps:WaitForChild("ControlScript");
	
	control.Disabled = true;
end;

plrs.PlayerAdded:Connect(turn_it_off);

for _, player in next, plrs:GetPlayers() do
	turn_it_off(player);
end

###Well, I hope I helped and have a nice day/night!

~~ KingLoneCat

1 comment

0

Alright, thanks for the help!

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