Hello, I've tried making a camera tweening script, which surprisingly enough, worked.
Now my problem was that you could just touch the part again, and the camera cutscene would start all over again, which I don't want.
So I made debounce, and it doens't seem to work, does anyone know why?
Script:
local cam = workspace.CurrentCamera
local TweenSerivce = game:GetService("TweenService")
local debounce = false
game.Workspace.Part.Touched:Connect(function()
if not debounce then debounce = true
debounce = true
cam.CFrame = CFrame.new(10,10,10)
cam.CameraType = Enum.CameraType.Scriptable
local tweeninfo = TweenInfo.new(5, Enum.EasingStyle.Back, Enum.EasingDirection.In)
local ECFrame = CFrame.new(20,20,20)
local RECFrame = CFrame.new(40,40,40)
local tween = TweenSerivce:Create(cam, tweeninfo, {CFrame = ECFrame})
local SecondTween = TweenSerivce:Create(cam, tweeninfo, {CFrame = RECFrame})
tween:Play()
SecondTween:Play()
cam.CameraType = Enum.CameraType.Custom
debounce = false
end
end)
Thanks for your time

2 comments
Thanks!
No problem!