I am a new scripter and I am in need of help. I have made a rotating camera script and that turned out fine, but I need help trying to go back to the player camera. I know I am missing something, but I don't know what. Here's the script:
local target = workspace.IntCam.CamBrick local camera = workspace.CurrentCamera camera.CameraSubject = target local angle = 299 while wait() do camera.CoordinateFrame = CFrame.new(target.Position) --Start at the position of the part * CFrame.Angles(0,angle,0) --Rotate by the angle * CFrame.new(0,0,-10) --Move the camera backwards 5 units angle = angle + math.rad(.5) wait(38.5) target = game.Players.LocalPlayer.Character.Head end
Not sure if this was already solved since it was 5 hours ago but i'll still answer. Your while wait() do loop won't work like that, since it's waiting for 38 seconds after waiting for 1/30th of a second AKA wait() Also your camera's cameratype must be "Scriptable"
local player=Game.Players.LocalPlayer local cam=Workspace.CurrentCamera repeat wait() until player.Character cam.CameraType="Custom" cam.CameraSubject=player.Character:WaitForChild("Humanoid") cam.CoordinateFrame=CFrame.new(0,0,0)