So in my game, I need to use Camera Manipulation. The only problem is that I'm new to Camera Manipulation and my script doesn't seem to be working right. This is my script:
local Camera = game.Workspace.CurrentCamera local Mouse = game.Players.LocalPlayer:GetMouse() local Players = game:GetService('Players') InInventory = false Mouse.KeyDown:Connect(function(key) if key:lower() == "e" or key:upper() == "E" then if InInventory == false then Camera.CameraType = Enum.CameraType.Scriptable InInventory = true end end end) Mouse.KeyDown:Connect(function(key) if key:lower() == "e" or key:upper() == "E" then if InInventory == true then Camera.CameraType = Enum.CameraType.Fixed Camera.CameraSubject = Players.LocalPlayer.Character:FindFirstChildOfClass("Humanoid") wait(2.5) InInventory = false end end end)
I made an inventory system. I want to use Camera Manipulation to make the player not able to move the Camera while in the inventory.
Anyone know how to do this, if so, please help.