HIi all
I am currently making a horror game
So i was working on a cutscene script and the the Camera tween wasnt timed perfectly so
I decided to add a touch trigger for presicion butafter adding the changes i t stopped working
i really can’t identify the problem so i was wondering if some one can help me.
here’s the script
local TweenService = game:GetService("TweenService")
local camera = game.Workspace.CurrentCamera
local Desto = game.Workspace.Desto
local Trigger = game.Workspace.Catrigger
local tweenInfo = TweenInfo.new(12, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, 0, false, 0)
function tween(part1,part2)
camera.CameraType = Enum.CameraType.Scriptable
camera.CFrame = part1.CFrame
Trigger.Touched:Connect(function()
local tween = TweenService:Create(camera, tweenInfo, {CFrame = part2.CFrame})
tween:Play()
Trigger:Destroy()
wait(13)
game.Workspace.Angle4.Transparency = 0
wait(0.4)
game.Workspace["car door"]:Play()
wait(6)
for _, player in pairs(game.Players:children())do
local char = player.Character
char.HumanoidRootPart.CFrame = Desto.CFrame
end
camera.CameraType = Enum.CameraType.Custom
end)
wait(18)
tween(game.Workspace.Angle2, game.Workspace.Angle3)
wait(12)