I want to make a spinning player camera for when the player joins, how would I make this?
there’s some info about it here: Camera
also, it’s missing info about how the default camera script is kinda slow to load, so I’d do pretty much
-- initializes the camera by setting the cameratype to allow scripting
camera = workspace.CurrentCamera
camera.CameraType = Enum.CameraType.Scriptable
-- this changes the cameratype back to Scriptable if the camera script loads after your script sets the cameraType
connection = camera:GetPropertyChangedSignal("CameraType"):Connect(function()
camera.CameraType = Enum.CameraType.Scriptable
end)
-- spin the camera
-- there are too many different ways to do this, but I prefer calculating the new position each step
spinStartTime = os.clock()
game:GetService("RunService"):BindToRenderStep("Spin Camera", Enum.RenderPriority.Camera.Value, function(d)
-- in this case, we spin around the position (1,2,3) from 12 studs away
camera.CFrame = (CFrame.new(1, 2, 3) * CFrame.Angles(0, 0.25 * (os.clock() - startSpinTime), 0)) * CFrame.new(0, 0, 12)
end)
-- wait for something to trigger ending the spinning
someEvent:Wait()
-- end the spinning
game:GetService("RunService"):UnbindFromRenderStep("Spin Camera")
connection:Disconnect()
-- change the camera type back
camera.CameraType = Enum.CameraType.Custom