Help with Camera Manipulation

Hello, sorry for the late response I have just been busy lately, but your video was amazing, and did work. Partly. Here is my script.

local input = game:GetService("UserInputService")

input.InputBegan:Connect(function(key)
	if key.KeyCode == Enum.KeyCode.P then
		player.RunCameraManipulation.Value = true
		MainMenu.Enabled = true
	end
end)

So the runcameramanipulation is a bool value, that when set to true will enable the camera manipulation, but it doesn’t work for some reason. Help is appreciated .

So basically when you tap p I want it to enable the main menu, and camera manipulation. I put it into a bool value, and when set to true/false it will turn on/off, but for some reason doesn’t work here. It worked with my tps though. Any help?

If you want a certain event to only happen if a user is holding a button then make use of RunService and UserInputService:IsKeyDown(). If you want something to be toggled with a key then make use of UserInputService.InputBegan and boolean logic operations.

local foo = true
foo = not foo -- foo is now false
foo = not foo -- foo is now true