I am using some camera settings/scripts to make a top-down invisicam camera. This is so that you see the world from above, but any roof becomes transparent so that way it doesn’t zoom in on your character a lot. After saving yesterday and coming back today, the camera started clipping through the roof making it impossible to see inside. I tried changing the camera mode to zoom, but all it did was just bring the camera a little closer.
Current camera settings:
Min/max camera zoom distance: 15
Camera mode: Classic
Occlusion mode: Invisicam
Movement modes: Classic
Current top-down script:
--Creates a top-down camera for each player. Should be used as a LocalScript
--Get service needed for events used in this script
local RunService = game:GetService("RunService")
-- Variables for the camera and player
local camera = workspace.CurrentCamera
local player = game.Players.LocalPlayer
-- Constant variable used to set the camera’s offset from the player
local CAMERA_OFFSET = Vector3.new(-1,90,0)
-- Enables the camera to do what this script says
camera.CameraType = Enum.CameraType.Scriptable
-- Called every time the screen refreshes
local function onRenderStep()
-- Check the player's character has spawned
if player.Character then
local playerPosition = player.Character.HumanoidRootPart.Position
local cameraPosition = playerPosition + CAMERA_OFFSET
-- make the camera follow the player
camera.CoordinateFrame = CFrame.new(cameraPosition, playerPosition)
end
end
RunService:BindToRenderStep("Camera", Enum.RenderPriority.Camera.Value, onRenderStep)