local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()
local humanoid = character:WaitForChild("Humanoid")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local TweenService = game:GetService("TweenService")
local camera = workspace.CurrentCamera
local cutsceneThings = workspace.CutsceneThings
local cutsceneStorage = ReplicatedStorage:WaitForChild("CutsceneStorage")
local sceneGui = script.Parent.Parent
local function setup()
camera.CameraType = Enum.CameraType.Scriptable
camera.FieldOfView = 60
sceneGui.Enabled = true
script.Music:Play()
end
local function positionCamera(pos)
camera.CFrame = pos
end
local function tweenCamera(endPos, tweenTime)
local camTween = TweenService:Create(camera, TweenInfo.new(tweenTime), {CFrame = endPos})
camTween:Play()
end
local function positionRig(rig, target)
rig.Parent = workspace
rig.PrimaryPart.CFrame = target
end
local function moveRig(rig, target)
rig.Humanoid:MoveTo(target.Position)
end
local function animateRig(rig, animation, toggle)
if toggle == true then
if rig and animation then
if rig.Humanoid then
animation:Play()
end
end
elseif toggle == false then
if rig and animation then
if rig.Humanoid then
animation:Stop()
end
end
end
end