Hey!* I dont know how or why but my studio keeps crashing when i test a cutscene for my game, the most rare thing is that in R6 studio crashes but on R15 it doesn’t, Could anyone know why or how this is happening?
R15 Playtest
External MediaR6 Playtest
External MediaMy code for the cutscene
local Players = game:GetService("Players")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local TweenService = game:GetService("TweenService")
local Player = Players.LocalPlayer
local Events = ReplicatedStorage:WaitForChild("Events")
local SuperChargeEvents = Events:WaitForChild("SuperCharge")
local Camera = game.Workspace.CurrentCamera
local CutsceneFrame = script.Parent.CutsceneFrame
local Sfx = script.Sfx
local CutsceneTrigger = SuperChargeEvents:WaitForChild("CutsceneTrigger")
function SFX()
Sfx.Transformation.Volume = 1.6
Sfx.Music.Volume = 0
Sfx.Transformation:Play()
wait(0.2)
Sfx.Music:Play()
wait(0.5)
TweenService:Create(Sfx.Music, TweenInfo.new(0.8), { Volume = 0.8 }):Play()
end
function start(Character)
if Character:FindFirstChild("Humanoid") then
local Root = Character:WaitForChild("HumanoidRootPart")
local Humanoid = Character:WaitForChild("Humanoid")
TweenService:Create(CutsceneFrame.UIScale, TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), { Scale = 1 }):Play()
TweenService:Create(Humanoid, TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut), { CameraOffset = Vector3.new(0,0,0) }):Play()
Root.Anchored = true
Camera.CameraType = Enum.CameraType.Scriptable
end
end
CutsceneTrigger.OnClientEvent:Connect(function(mainPlayer: Player)
if mainPlayer.Name == Player.Name then
-- When the player to get the power is the client
SFX()
start(mainPlayer.Character)
else
-- When someone else gets the power
SFX()
end
end)
when event is triggered the script shows a diferent cutscene for the player that got the power and for the other players that didnt.
Edit: Oh, and ignore the music, its going to be replaced soon, Sorry