Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Character's head disappear in a cutscene?

Asked by 3 years ago

I made a simple cutscene for my game. However, when the cutscene starts, the character's head is disappearing, any solutions to solve this? Thank you in advance.

local TweenService = game:GetService("TweenService")

local camera = workspace.Camera

local cutsceneTime = 7


local tweenInfo = TweenInfo.new(
    cutsceneTime,
    Enum.EasingStyle.Sine,
    Enum.EasingDirection.Out,
    0,
    false,
    0
)

local function tween(part1, part2)
    camera.CameraType = Enum.CameraType.Scriptable
    camera.CFrame = part1.CFrame

    local tween = TweenService:Create(camera, tweenInfo, {CFrame = part2.CFrame})
    tween:Play()

    wait(cutsceneTime)
end


game.ReplicatedStorage.FinaleCamera.OnClientEvent:Connect(function()
    tween(workspace.CameraFinale1, workspace.CameraFinale2)
end)

Answer this question