I made this script and it was working fine before. Only added a few variables so I could edit it more freely. Suddenly the camera stopped moving. It goes to the correct first position, but then it won't move like it is supposed to.
Any support? I have checked all the variables and locations of the values and they are all correct.
Here is the code below.
wait()
foc = script.Parent.camFoc.Value
camPos = script.Parent.camPos.Value
speed = script.Parent.camSpeed.Value
pos = script.Parent.camPosTwo.Value
while true do
pos = script.Parent.camPosTwo.Value
foc = script.Parent.camFoc.Value
camPos = script.Parent.camPos.Value
speed = script.Parent.camSpeed.Value
game.Workspace.CurrentCamera.CoordinateFrame = CFrame.new(script.Parent.camNumber.Value-14.2, 31.5, -pos)
game.Workspace.CurrentCamera.CameraType = "Fixed"
game.Workspace.CurrentCamera.FieldOfView = "60"
game.Workspace.CurrentCamera.Focus = CFrame.new(camPos,0,foc)
speed = script.Parent.camSpeed.Value
pos = pos + speed
foc = foc + speed
wait()
end

2 comments
In line 12 shouldn't that be pos not -pos?
No, I've done that to make that a negative number. It doesn't work either when I remove the '-'.