I want to make a script, so the CurrentCamera's CFrame lerps from one camera part to another camera part. This is what I wrote, it fires when a remote event fires all clients.
game.ReplicatedStorage.SeatCameraChange.OnClientEvent:Connect(function() workspace.CurrentCamera.CameraType = Enum.CameraType.Scriptable for Num = 0, 1, 0.01 do workspace.CurrentCamera.CFrame = workspace.CameraPart.CFrame:Lerp(workspace.CloseChairCamera.CFrame, Num) end end)
It doesn't move the camera. The camera goes straight to CloseChairCamera.CFrame
with no lerp.
Any help would be appreciated.
I fixed it. All I had to do was write this line of code after it.
game:GetService("RunService").RenderStepped:Wait()
This waited for the event to happen.