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

How does Camera Manipulation work?

Asked by 5 years ago

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.

0
Where is this script located? JoinMyWorld 2 — 5y
0
StarterGui SuperQmod 18 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

Never mind, I fixed it.

Ad

Answer this question