Cutscene Module V1 ━ a easy-to-use Cutscene API

Cutscene Module V1

a module for easier cutscene creation
module is still WIP!


This is one of my first ever made Community Resources so please don't judge me. Grammar/Spelling errors may appear.
Current Version: 1.23

πŸ”¨ The Features:

  • Cinematic GUI
    • These Black Squares that tween into the Screen
  • Camera Manipulation
    • Supports Tweens
    • Based on Offset Rotation from a Target Part.
  • Dialouges
    • with animations
  • Templates and animations are easily addable
    • Animations are defined in ModuleScripts.
    • Templates are ScreenGUIs in the β€˜Templates’ folder.
  • Auto-Correction
    • The Module supports Tab-Completion & uses setmetatable()

πŸ‘€ Check it out:

🎬 Showcase

🚧 A Example:

:rocket: Get started!

πŸ’‘ Tutorial

Getting the Module

The Module is available from the Roblox Creator Store and GitHub. You can get the Module from the 'Get' and 'Git' Button at the Start.

:rocket: Jump to the Top

  • To get it from the Creator Store
    • Click Get at the top of this post.
    • Click Get Model.
    • Open the Tool-Box in Roblox Studio.
    • Navigate to the Inventory tab.
    • Click on Cutscene Module V1.23.
  • To get it from GitHub:
    • Click Git at the start of this post.
    • Go to Releases.
    • Download the latest .rbxm file.
    • Import the file into Roblox Studio.

Then place it anywhere you want.

Requiring the Module

To require/use the module, use the following snippet:

local ccm = require(path.cutsceneModule) -- replace 'path' with the actual path of the module
local cutscene = ccm.new({})

How to use

To begin actually using the module, you need to specify the settings. Here's a full table of possible settings (as of V1.23):
ccm.new({
         targets = {Players}, -- Players affected by the cutscene

         cutscene = {
                 template = number, -- Defaults on 1
         	 time = number, -- Tween time for In()
         	 distance = number, -- GUI distance (0.5 = full screen)
         	 returnTime = number, -- Tween time for Out()
         	 delay = number, -- Delay before Out() in AutoIn()
         }

         camera = {
             targetPart = BasePart,
             offsetRotation = Vector3, -- The offset-rotation
             offsetPosition = Vector3, -- The offset-position
             rotateWithTarget = boolean, -- If the Rotation should add with the Targets Rotation
             positionWithTarget = boolean, -- If the Position should multiply with the Targets Position
         }

         dialouge = {
         	 template = number, -- Defaults on 1
         	 text = {
         	 	[number] = {
         	 		beginwait = number, -- The wait-time at the beginning of the text
         	 		text = string,
         	 		animation = number, -- The Animation (Defaults on 1)
         	 		time = number, -- How long the animation should take
         	 		delay = number, -- The wait-time before the text disappears (w/ animation)
         	 		endwait = number, -- The wait-time at the end of the text
         	 	},
         	 	
                        -- After this point only use value which needed (for your cutscene)
         	 	playername = { 
         	 		text = string,
         	 		animation = number, -- The Animation (Defaults on 1)
         	 		time = number, -- How long the animation should take
         	 		delay = number, -- The wait-time before the text disappears
         	 	},
         	 },
})


For the TweenCamera Settings Table:

cutscene:TweenCamera({
         time,
         easingStyle,
         easingDirection,
         repeatCount,
         reverses,
         delay,
         position = Vector3,
         rotation = Vector3
})

A Example

Here a example how it would look like (used in the showcase):

-- LOCAL SCRIPT
local ccm = require(game.ReplicatedStorage.cutsceneModule)
local player = game.Players.LocalPlayer
local character = player.Character or player.CharacterAdded:Wait()

local cutscene = ccm.new({
	targets = {player},
	
	cutscene = {
		template = 1,
		time = 1,
		distance = .2,
		returnTime = 1,
		delay = 2,
	},
	
	camera = {
		targetPart = character:WaitForChild("HumanoidRootPart"),
		offsetRotation = Vector3.new(0, 180, 0),
		offsetPosition = Vector3.new(0, 1, -5),
		rotateWithTarget = true,
		positionWithTarget = true
	},
	
	dialouge = {
		template = 1,
		
		text = {
			[1] = {
				beginwait = 0,
				text = "this is a really cool showcase!",
				animation = 1,
				time = 1,
				delay = 1,
				endwait = 0,
			},
		},

		playername = {
			text = game.Players.LocalPlayer.Name,
			animation = 1,
			time = 1,
			delay = 2,
		},
	},
})

cutscene:AutoIn()
cutscene:ActivateCamera()
task.wait(1)
cutscene:StartDialouge()

For more information look at the Documentation below this dropdown menu.


πŸ“ƒ Documentation
πŸš€Navigation

Functions


ccm.new(settingsTable)
Creates a new metatable with specified settings under the settingsTable variable as a table.
Find the settings table under the dropdown menu above the documentation.
This is needed for every other function.

:rocket: Jump to the Settings Table


cutscene:OverrideSettings(settingsTable)
Overrides settings for an existing cutscene.
Does not change all settings, only the specified ones.


cutscene:AutoIn() For GUI Cinematic Bars
Automatically uses ccm:In() and ccm:Out().
Requires all of the variables under cutscenee.


cutscene:In() For GUI Cinematic Bars
Tweens the Cinematic Bars In.
Requires the time and distance variable under cutscene.


cutscene:Out() For GUI Cinematic Bars
Tweens the Cinematic Bars Out.
Requires the returnTime variable under cutscene.


cutscene:ActivateCamera() For Camera
Activates the Camera with the according settings.
Requires targetPart.


cutscene:DeactivateCamera() For Camera
Sets the camera’s type back to Enum.CameraType.Custom.


cutscene:Update() For Camera
Updates the cameras Position & Rotation.


cutscene:TweenCamera(tweenSettings) For Camera
Tweens the camera according to the settings under tweenSettings.

:rocket: Jump to the TweenSettings Table


cutscene:StartDialouge() For Dialouge
Starts the dialouge with the settings specified under the cutscene.


cutscene:Destroy()
Destroys the cutscene, including its GUIs and Parts.


Remember: This Module is still WIP and most things are subject to change. If you have any suggestions, questions or bug reports, join my Discord below or just comment under this forum.

The cutscene:TweenCamera() will be removed soon, since im going to implement a callback for the camera part so you can use your own tweens.

I will improve this forum in the near furture.
The module took me around 5 hours to write, and the forum post around 2 hours.
I would appreciate if you included credits. :slight_smile:
Feel free to give feedbacks!


πŸ”— Social Links πŸ”—

Roblox Group: Seraphic Labs
Roblox Profile: the_h0lysandwich
Discord: Seraphic Labs
3 Likes