Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

What should I change to make my Camera CFrame loop until spawned?

Asked by 5 years ago

I have a Main Menu Gui that once spawned cycles through 3 different camera parts. Yet it only cycles through once and I cannot figure out the correct way of coding the loop.

01-- Locals --
02 
03local camera = game.Workspace.CurrentCamera
04local player = game.Players.LocalPlayer
05 
06 
07-- Main Script --
08 
09repeat wait() until player.Character
10    camera.CameraType = "Scriptable"
11    camera.CFrame = game.Workspace.CAM1.CFrame
12    wait(3)
13    camera.CFrame = game.Workspace.CAM2.CFrame
14    wait(3)
15    camera.CFrame = game.Workspace.CAM3.CFrame
16    wait(3)

Also note I want this loop to break once spawned. I think im supposed to use the, "for I, v in pairs" loop but I don't know the correct way of going about this.

Thanks

~GoodkidMad

0
Explain more please sfant43 20 — 5y

Answer this question