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)

2 comments
why is there a repeat wait() in the middle of your code?
It repeats changing the camera type until theer camera type is equal to scriptable, but the camera is not changing