Help with Forced Perspective

  1. What do you want to achieve?

I would like to achieve a forced prospective that will give a view that the person can’t control. (Still prospective) Example: A stage and the host gives people a view of the stage everyone sees at the same time. Only the host can see the gui that controls it.

  1. What is the issue?

I am not great at scripting I have looked around for a while now and I could not find it.

  1. What solutions have you tried so far?

I have tried to look around for the longest time so I decided to come here.

1 Like

One way to go about this is to have a remote event that fires from the host to change everyone’s CurrentCamera cframe. This should be very straight forward as there are many tutorials on camera manipulation and remote events.

1 Like

1 Make some brick that will be simulation position of the camera.
2 Call this code when needed: (LocalScript)

local camera = game.Workspace.CurrentCamera
local view = -- Get the birck from stem number 1
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = view.CFrame

-- Call this when you want to lock the camera back to character

local camera = game.Workspace.CurrentCamera
local view = -- Get the birck from stem number 1
camera.CameraType = Enum.CameraType.Custom
local character = game.Players.LocalPlayer.Characted or game.Players.LocalPlayer.CharactedAdded:Wait()
camera.CameraSubject = character:WaitForChild("Humanoid")

This should lock player’s camera to the birck you created in step 1. If you’d need camera to be moving, please let me know, I will make some changes to the code.

Make sure to add the remote event and camera part.
I am not able to test it right now but it should work.

-- script inside the gui button

local Button = script.Parent
local CameraEvent = game.ReplicatedStorage.CameraEvent

button.MouseButton1Click:Connect(function()
	CameraEvent:FireAllClients()
end)

-- script inside player (startergui etc.)

local CameraEvent = game.ReplicatedStorage.CameraEvent
local CurrentCamera = game.Workspace.CurrentCamera
local CameraPart = game.Workspace.CameraPart -- Your camera part.

CameraEvent.OnClientEvent(function()
	repeat CurrentCamera.CameraType = Enum.CameraType.Scriptable
	until CurrentCamera.CameraType == Enum.CameraType.Scriptable
	
	CurrentCamera.CFrame = CameraPart.CFrame
end)