Currently I’m scripting a terminal of sorts. A part is placed right in front of it. In which if the player interacts with it, their camera would be set to the part.
However, I’m unable to find a way to make it so that the player can’t rotate their camera, I saw things such as using CameraType.Fixed but that was not helped.
Help would be appreciated.
local interact = workspace.Terminal.InteractTerminal
local players = game:GetService("Players")
local RunService = game:GetService("RunService")
local player = players.LocalPlayer
local hum = player.Character.Humanoid
local camera = workspace.CurrentCamera
local function switchCamera(switch)
player.Character.Humanoid.WalkSpeed = 0
local pos = workspace.Terminal.CameraView
camera.CameraSubject = pos
end
interact.OnClientEvent:Connect(switchCamera)
local camera = workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
local function switchCamera(switch)
player.Character.Humanoid.WalkSpeed = 0
local pos = workspace.Terminal.CameraView
camera.CameraSubject = pos
camera.CFrame = pos.CFrame
end
I don’t think you set changed the CameraType to Scriptable, meaning anything you did to the camera most likely did nothing.