So, I'm currently working on a plugin that makes it easier to make cutscenes. But, I ran into a problem. For this to work I need to be able to rotate the in-studio camera. I have this code:
while rotate do game.Workspace.Camera.CoordinateFrame = game.Workspace.Camera.CoordinateFrame* CFrame.Angles(0, 0, math.rad(180)) RunService.RenderStepped:wait() end
But all it does is make an endless loop of it going upside down and up again. Is there another script preventing this from happening. idk plz help!
ANSWER: The problem was the Camera type had to be set to fixed!
WORKING CODE:
local RunService = game:GetService("RunService") game.Workspace.Camera.CameraType = Enum.CameraType.Fixed while rotate do game.Workspace.Camera.CoordinateFrame = game.Workspace.Camera.CoordinateFrame* CFrame.Angles(0, 0, math.rad(180)) RunService.RenderStepped:wait() end game.Workspace.Camera.CameraType = Enum.CameraType.Custom
SIMPLIFIED CODE:
game.Workspace.Camera.CameraType = Enum.CameraType.Custom game.Workspace.Camera.CoordinateFrame = game.Workspace.Camera.CoordinateFrame* CFrame.Angles(0, 0, math.rad(num))
by: @BongoCatJoosan
the working code will work even when its off so you can get rid of the while rotate do and the wait and the end changing back to custom