I am trying to make a Remote Event that changes everyone's camera type and for some reason it is not working after trying multiple ways, can anyone help? The entire script has been pasted below.
local ReplicatedStorage = game:GetService("ReplicatedStorage") local CamAll = ReplicatedStorage:WaitForChild("CamAll") local cam = workspace.Camera local CamPart = game.Workspace.CamPart CamAll.OnServerEvent:Connect(function() local FocusPart = game.Workspace.FocusPart print("Cam Enabled.") repeat wait() cam.CameraType = Enum.CameraType.Scriptable until cam.CameraType == Enum.CameraType.Scriptable cam:Interpolate(CamPart.CFrame, FocusPart.CFrame, 0.5) script.Parent.Visible = false script.Parent.Parent.Disable.Visible = true wait(0.2) end)
From what it seems, you're manipulating the camera on the Server-side, which isn't possible. You need to do it on the client.
Instead of calling the RemoteEvent from the client, call it from the server with :FireAllClients
and set up a OnClientEvent:
in PlayerScripts.
As said lightifieds you need to this on client not on server, Also Camera is not players camera is your studio camera when you run a code from console bar you can set your camera cframe to part like if you are in player mode so you need be on client and use CurrentCamera because that is player camera