So i have this cutscene at the beginning of the game some people seems to get stuck on it like the camera is not resetting
Here is the video:
this had me puzzled for months now ever since the release of the game even now i still don’t know why it’s happening and why they are getting stuck on it i tried everything
worse part is i don’t know how to replicate the bug!
Here is the code for my cutscene:
local function FixCam()
local Cam = game.Workspace.CurrentCamera
Character.Humanoid.CameraOffset = Vector3.new(0,-3,-2)
Character.Humanoid.WalkSpeed = 10
Cam.CameraType = Enum.CameraType.Custom
Character.WeightedCam.Enabled = true
print("Camera got reset if not contact developer.")
if player.PlayerGui:FindFirstChild('TouchGui') then
player.PlayerGui.TouchGui.Enabled = true
end
end
--CUTSCENE START
local Cutscene = task.spawn(function()
if Stop == false then
CutsceneModule.Start()
CutsceneModule.SetCam(CamFolder.Camera1, 73)
UI.OST:Play()
AnimatedTween.tweenObject(UI.OST, targetProperties1, 15, Enum.EasingStyle.Quad, Enum.EasingDirection.Out, true)
task.wait(5)
UI.Piano2:Play()
CutsceneModule.PlayAnimation(Rig1, 13538931789)
task.wait(.5)
CutsceneModule.SetCam(CamFolder.Camera2, 73)
SubtitleModule.SubtitlesVoice(VoicesFol.Recording12, "Your parents; children, your romantic partner?")
CutsceneModule.SetCam(CamFolder.Camera3, 70)
UI.Sting2:Play()
task.wait(.5)
CutsceneModule.Clear(Rig1)
CutsceneModule.PlayAnimation(Rig1, 13539264497)
task.wait(2)
Rig1["Left Arm"]["Old book"].Transparency = 0
workspace["Old book"]:Destroy()
SubtitleModule.SubtitlesVoice(VoicesFol.Recording13, "What would you do, to save them?")
CutsceneModule.Clear(Rig1)
CutsceneModule.PlayAnimation(Rig1, 13542822619)
task.wait(.5)
CutsceneModule.SetCam(CamFolder.Camera4, 60)
Rig1["Left Arm"]["Old book"].Transparency = 1
workspace.OldBook3.Transparency = 0
UI.Sting:Play()
task.wait(3)
SubtitleModule.SubtitlesVoice(VoicesFol.Recording14, "What if there was a cure?")
task.wait(2)
CutsceneModule.SetCam(CamFolder.Camera5, 65)
task.wait(1.5)
UI.Background.Visible = true
CutsceneModule.SetCam(CamFolder.Camera6, 75)
CutsceneModule.PlayAnimation(Rig2, 13543072335)
task.wait(.2)
UI.Background.Visible = false
task.wait(.5)
SubtitleModule.SubtitlesVoice(VoicesFol.Recording16, "Are you willing to risk your life?")
task.wait(2)
UI.Background.Visible = true
CutsceneModule.SetCam(CamFolder.Camera5, 65)
task.wait(.2)
UI.Background.Visible = false
CutsceneModule.PlayAnimation(Rig1, 13543232804)
task.wait(.8)
workspace.SFX.Bass.Volume = 0
UI.Sting:Stop()
UI.OST:Stop()
UI.Table:Play()
UI.Background.Visible = true
task.wait(3)
SubtitleModule.SubtitlesVoice(VoicesFol.Recording21, "FOR LOVE, WE WILL DO, ANYTHING.")
player.PlayerGui.CineMaticBar.Enabled = false
task.wait(5)
CutsceneModule.Stop()
FixCam()
Background:Play()
player.isLoaded.Value = true
game.Lighting.EnvironmentDiffuseScale = 1
game.Lighting.EnvironmentSpecularScale = 1
Background.Completed:Wait()
UI.Enabled = false
AnimatedTween.tweenObject(workspace.SFX.Bass, targetProperties, 1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out, false)
task.wait(3)
SubtitleModule.Subtitles("[BAPHOMET'S CAVE]", 5)
Character:SetAttribute("IsStanding", false)
end
end)
the module i used:
local CutsceneModule = {}
local Player
local Cam
local Char
local TS = game:GetService("TweenService")
local SizeTween
local FieldOfViewGoal = 73
function CutsceneModule.Init(player)
--Make player LoseControl and get camera for all character
Player = player
Char = player.Character
Char.WeightedCam.Enabled = false
Cam = workspace.CurrentCamera
Char.Humanoid.WalkSpeed = 0
if player.PlayerGui:FindFirstChild('TouchGui') then
player.PlayerGui.TouchGui.Enabled = false
end
end
function CutsceneModule.Start()
--Make camera
Char.WeightedCam.Enabled = false
Cam.CameraType = Enum.CameraType.Scriptable
end
function CutsceneModule.SetCam(Camera, FOV)
FieldOfViewGoal = FOV or 73
local TweenSize = TweenInfo.new(10, Enum.EasingStyle.Sine, Enum.EasingDirection.Out)
if SizeTween then
SizeTween:Cancel()
end
SizeTween = TS:Create(
Cam,
TweenSize,
{ FieldOfView = FieldOfViewGoal }
)
Cam.CFrame = Camera.CFrame
Cam.FieldOfView = 70
SizeTween:Play()
end
function CutsceneModule.Stop()
--Reset Everything
Char.Humanoid.CameraOffset = Vector3.new(0,-3,-2)
Char.Humanoid.WalkSpeed = 10
Cam.CameraType = Enum.CameraType.Custom
Char.WeightedCam.Enabled = true
print("Camera got reset if not contact developer.")
if Player.PlayerGui:FindFirstChild('TouchGui') then
Player.PlayerGui.TouchGui.Enabled = true
end
end
function CutsceneModule.PlayAnimation(Character, ID, PlayerID)
local humanoid = Character:FindFirstChildOfClass("Humanoid")
script.Animation.AnimationId = "rbxassetid://".. ID
if not Character or not Character:IsA("Model") then
error("Invalid Character provided")
return
end
if not humanoid then
error("The provided Character does not have a Humanoid")
return
end
humanoid:LoadAnimation(script.Animation):Play()
end
function CutsceneModule.Clear(Character)
for i,v in pairs(Character.Humanoid:GetPlayingAnimationTracks()) do
v:Stop()
end
end
return CutsceneModule
Can someone help me please