so i have a script that lerps camera cframes and i have a function where i can switch certian views and it works but this specific lines of code that wont activate the first line no matter where i put it but code without the wait works perfectly fine.
what im trying to acheave is that at the five seconds it changes to that cframe but it seems to make the first line make it not work but after the wait it goes to that first. im unsure whats wrong with it.
when i remove the wait and the code after wait it works and i swopped if its the part but it was not so.
if Selected == 1 then -- this is true if s1 == false then -- this is false so it will go through if AnimationPlaying == false then -- this is also false so it will go through s1 = true -- this toggles it so that in RenderStepped it will go through once until it is done Goal = CameraLocations.Panning.CFrame panspeed = 0.001 FOVGOAL = 35 FOVSPEED = 0.25 wait(5) Goal = CameraLocations.Panning_area1.CFrame panspeed = 0.001 FOVGOAL = 50 FOVSPEED = 0.5 s1 = false end end end