Simple Cutscene *Help*

So i spend a few hours and made a simple cutscene which works with the help of cameras and it triggers when a part is touched . i tested it and it works well , Although i hsve a few things i need to fix and i dont know how to fix them. ill Start one by one.

Firstly I need to make it that when the player touches the part it triggers the cutscene and puts 2 blsck bars at the top and the bottom something called “LetterBoxing”

Secondly I need that when the part is touched the 2 black bars appear but all the other gui buttons , minimap ui disappear and reappear when the cutscene is finished ( the black bars also need to disappear when the cutscene is finished)

Heres a link to my cutscene model
Feel Free to experiment with it
The instructions to set it up are in the model itself

Any Help Is Appreciated
Thanks

Instead of explaining empty words, I have created your model and written some tags that explain the changed stuff. If there are any errors, feel free to reply back :slightly_smiling_face:

Video:
robloxapp-20241028-1623532.wmv (2.5 MB)

Script with LetterBoxing GUI:
CutsceneScript.rbxm (4.7 KB)

1 Like

Thanks So Much
I cant explain how happy i am
Thanks again
:grinning:

2 Likes

I tested it in my main game and im having a lot of issues

2 Likes

Uh firstly i disabled the leaderboard and my inventory and its making it all appear again
And it triggers even when the part is not touched
It also disables my intro and stuff

Could you check and fix it please

1 Like

i figured out to disable the default roblox inventory and player list
but my game uses radial backpack , in order to enable it you press a certain key
but the cutscene ends and makes it appear
how would disable it from showing

Heres the video showing the issue
robloxapp-20241028-2153298.wmv (4.4 MB)

1 Like

I’m sorry for the late response and for the issues with the code!

I have made some fixes to the code in order to apply to your game requirements and yeah, you are right for that bug.

I haven’t tested this code but I’m sure will get the idea of how it can be fixed and probably even make your own unique and better script! :smiley:

local tweenservice = game:GetService("TweenService")
local StarterGui = game:GetService("StarterGui") -- service used to disable default roblox guis

local plr = game.Players.LocalPlayer

local PlayerGui = plr:WaitForChild('PlayerGui') -- where all local player guis are stored

local currentCamera = workspace.CurrentCamera
local folder = workspace:WaitForChild("Cutscene")

local db = true


local gui_LetterBoxing = script.LetterBoxing -- the gui LetterBoxing


local UsedGui


local tbl_DisabledGuis = {} -- this will store all guis that are enabled. Only enabled ones so the disabled ones won't get enabled.


local function DisableAllActiveGuis()
	for _, gui :ScreenGui in pairs(PlayerGui:GetDescendants()) do
		task.spawn(function()
			if(gui:IsA("ScreenGui") == false) then
				return
			end
			
			-- checking if the gui is disabled ( so it won't open disabled ones later )
			if(gui.Enabled == false) then
				return
			end
			
			gui.Enabled = false
			
			table.insert(tbl_DisabledGuis, gui)
		end)
	end
end


local function EnableAllDisabledGuis()
	
	-- enables only guis stored in that table
	for _, gui in pairs(tbl_DisabledGuis) do
		gui.Enabled = true
	end
	
	tbl_DisabledGuis = {}
end


local function ChangeRobloxGuisStatusTo(status)
	StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, status)
	
	StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.Backpack, true) -- for instance if you want to make the backpack always enabled
end

-- adds these LetterBoxing frames - enables the gui
local function AddLetterBoxing()
	UsedGui = gui_LetterBoxing:Clone()
	UsedGui.Parent = PlayerGui
end

local function cueCutsceneCam(speed)
	local tweeninfo = TweenInfo.new(speed, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)

	currentCamera.CameraType = Enum.CameraType.Scriptable
	currentCamera.CFrame = folder[1].CFrame

	for i = 2, #folder:GetChildren() do
		if folder:FindFirstChild(i.."S") then
			currentCamera.CFrame = folder[i.."S"].CFrame
		else
			tweenservice:Create(currentCamera, tweeninfo, {CFrame = folder[i].CFrame}):Play()
			wait(tweeninfo.Time)
		end
	end

	currentCamera.CameraType = Enum.CameraType.Custom
end

workspace:WaitForChild("Trigger").Touched:Connect(function(touched)
	if touched.Parent == plr.Character and db == true then db = false
		
		DisableAllActiveGuis()
		
		ChangeRobloxGuisStatusTo(false)
		
		AddLetterBoxing()
		
		cueCutsceneCam(10)
		
		ChangeRobloxGuisStatusTo(true)
		
		EnableAllDisabledGuis()
		
		UsedGui:Destroy()
	end
end)



If you have any other issues feel free to reply and I hope I was useful! :slightly_smiling_face:

1 Like

Thanks the code worked , Although i had to modify it a bit to fit my needs
but it works , Thanks for your help , This will be helpful with my story :smiley:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.