Hello! So I made An Isometric Camera that works just fine, except that you can move around the camera.
as you can see, it works fine, but i can still move around my camera. I’d like to make it so that you can’t move around the camera, like in the first couple seconds of the video, if that makes any sense. Basically i just need to disable the camera movement made by players, but i’m not sure how. I’ve tried looking it up but nothing appears.
Thank you, i can post the script that i made to see if it would help
local zoom = 500
local FieldOfView = 7
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
local Character = Player.Character or Player.CharacterAdded:Wait()
local Camera = game.Workspace.CurrentCamera
Camera.CameraType = Enum.CameraType.Custom
local RunService = game:GetService(“RunService”)
RunService.RenderStepped:Connect(function()
Camera.FieldOfView = FieldOfView
if Character then
if Character:FindFirstChild(“Head”) then
game:GetService(“SoundService”):SetListener(Enum,ListenerType.ObjectCFrame, Character.Head)
Camera.CFrame =
CFrame.new(Vector3.new(Character.Head.Position.X + zoom, Character.Head.Position.Y + zoom, Character.Head.Position.Z + zoom), Character.Head.Position)
end
end
end)
-- Place this script in StarterPlayer > StarterPlayerScripts
local Players = game:GetService("Players")
local RunService = game:GetService("RunService")
local player = Players.LocalPlayer
local camera = workspace.CurrentCamera
local sensitivity = 0.1 -- Adjust the sensitivity to your preference
local function onRenderStep()
local mouseDelta = player:GetMouse().Delta
local rotateY = CFrame.Angles(0, math.rad(-mouseDelta.x * sensitivity), 0)
local rotateX = CFrame.Angles(math.rad(-mouseDelta.y * sensitivity), 0, 0)
camera.CFrame = camera.CFrame * rotateX * rotateY
end
RunService.RenderStepped:Connect(onRenderStep)
it doesnt seem to be working for some reason. I put the script in a local script inside of starterplayerscripts but i can still move my camera normally
If your isometric camera otherwise works as you’d like, do remember that if you name the LocalScript containing its code to CameraScript and place it inside StarterPlayerScripts, it would allow you to disable the default camera logic which will prevent players from rotating or zooming the camera
If I understand you correctly, then yes it would also disable the ability for players to zoom the camera unfortunately so OP will need to add it back to their camera system if they wish
when i did that it stopped working. Right now it’s in startercharacterscripts named CameraScript, but when i put it into starterplayer scripts it stopped working