You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
In my game I have a while loop that makes the current camera pan from side to side. -
What is the issue? Include screenshots / videos if possible!
But when the player switches to a different cam, the tween will start freaking out and taking the player back to the other camera, sometimes not even switching cameras -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
I attempted to look for solutions but I don’t think anyone has something similar to this.
After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!
Here’s the code:
game.Workspace.Office.PlayerActions:WaitForChild("Camera").Changed:Connect(function()
local cam2 = game.Workspace.Office.PlayerActions.Camera
task.wait(1)
local cam3 = game.Workspace.Office.PlayerActions.Camera.Value
local move1 = tweenservice:Create(cam, tweeninfo4, {CFrame = game.Workspace.Cameras:FindFirstChild(cam2.Value).CamPart1.CFrame})
local move2 = tweenservice:Create(cam, tweeninfo4, {CFrame = game.Workspace.Cameras:FindFirstChild(cam2.Value).CamPart2.CFrame})
while true do
move1:Play()
task.wait(6)
move2:Play()
task.wait(6)
end
end)
If you guys could tell me how to stop this from happening that would be great.