if ending and not forcestop then
if ending then
camera.CameraType = Enum.CameraType.Custom
local character = player.Character
if character then
camera.CameraType = Enum.CameraType.Custom --temp
camera.CameraSubject = character
end
end
end
I have to go AFK again, but this time it’ll take max 8 minutes, sorry if i take a little bit more.
Weird results. It goes from camera 1 to 2, and then glitches and moves back to camera 1, then PAST camera 1. Then, after a while, it teleports to camera 3 and the same issue reoccurs.
Hey dude, that’s a sad thing to hear.
Sorry that i couldn’t fix you’re problem yet…
Can you do team create? Maybe we can both fix this issue in studio.
I just can’t believe such a simple issue with camera tweens ended up being like this. I’m going to go take another look at the code, see what I can change.
--[[if ending and forcestop == false then
camera.CameraType = Enum.CameraType.Custom
local character = player.Character
if character then
camera.CameraType = Enum.CameraType.Custom --temp
camera.CameraSubject = character
end
]]--
I’m pretty sure it isn’t necessary as I’m looping it.
local TweenService = game:GetService("TweenService")
local cams = game.Workspace.Cameras
local done = false
local camera = game.Workspace.Camera
local sceneTime = 20
local tween = nil
local forcestop = false
local tweeninfo = TweenInfo.new(
sceneTime,
Enum.EasingStyle.Sine,
Enum.EasingDirection.Out,
0,
true,
0
)
local player = game.Players.LocalPlayer
function TweenFunction(camera1, camera2, ending)
if forcestop == false then
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = camera1.CFrame
tween = TweenService:Create(camera, tweeninfo, {CFrame = camera2.CFrame})
tween:Play()
tween.Completed:Wait()
end
end
script.Parent.MouseButton1Click:Connect(function()
if tween then
tween:Cancel()
tween:Cancel()
tween:Cancel()
tween:Cancel()
tween:Cancel()
end
camera.CameraType = Enum.CameraType.Custom
local character = workspace:FindFirstChild(player.Name)
if character then
camera.CameraSubject = character
end
script.Parent.Parent.Parent.Enabled = false
forcestop = true
end)
repeat
if not forcestop then
TweenFunction(cams.Camera1, cams.Camera2, false)
end
if not forcestop then
TweenFunction(cams.Camera3, cams.Camera4, false)
end
if not forcestop then
TweenFunction(cams.Camera5, cams.Camera6, false)
end
if not forcestop then
TweenFunction(cams.Camera7, cams.Camera8, false)
end
if not forcestop then
TweenFunction(cams.Camera9, cams.Camera10, true)
end
camera.CameraType = Enum.CameraType.Custom
local character = player.Character
if character then
camera.CameraType = Enum.CameraType.Custom --temp
camera.CameraSubject = character
end
until forcestop