Mango! [A New Cutscene Service]

Hello guys! This is my first ever community resource for y’all, so apologies if I seem a bit inexperienced (it’s because I am)

What is Mango?

Mango is a module that allows developers to play cutscenes made in an animation setting (aka Moon Animator or Roblox Animation Editor) inside of your ACTUAL game! (meaning while testing)

What does it look like?

Here is an example of a “domain expansion” respectfully inspired by the anime “Jujutsu Kaisen” made in an animation setting:

Here is the same animation but played in game!

How do I set it up?

1: Download the .rbxm file here
2: Drag and drop it into your roblox studio, I’d recommend putting it in your ReplicatedStorage
3: Make a local script titled whatever you want in StarterCharacterScripts
4: Inside that local script copy paste this code:

local CutsceneService = require(game.ReplicatedStorage.CutsceneService).new(
	{
		CameraObject = workspace.CurrentCamera, 
		VFXData = require(game.ReplicatedStorage.VFXData)
	}
)
CutsceneService:ListenClient()

Change VFXData to a module script containing your named functions (I’ll get to that later).
5: Create a module script in ReplicatedStorage, title it whatever but copy paste this code:

local VFXData = {
	['rbxassetid:/youranimationid'] = {
		['ExampleFunction'] = function()
            print("This will run when the animation reaches the named keyframe above! (ExampleFunction)")
		end,
		['ExampleFunction2'] = function()
            print("This will run when the animation reaches the named keyframe above! (ExampleFunction2)")
		end,
		['ExampleFunction3'] = function()
            print("This will run when the animation reaches the named keyframe above! (ExampleFunction3)")
		end,
		End = function()
			print("This will run at the end of the animation!")
		end,
	}
}

return VFXData

How do I actually use the service?

Create a server-sided script, title it whatever and copy paste this example script, you can modify it however you please but this is for demonstration purposes.

local CutsceneService = require(game.ReplicatedStorage.CutsceneService).new()


task.wait(10)

for _, players: Player in pairs(game:GetService("Players"):GetPlayers()) do
	
	local VFXFolderClone: Folder = game.ReplicatedStorage.VFX:Clone()
	VFXFolderClone.Parent = players.Character

	
	for _, parts: BasePart in pairs(VFXFolderClone:GetChildren()) do
		if parts:IsA("BasePart") then
			local motor6d = Instance.new('Motor6D', players.Character:WaitForChild('Torso'))
			motor6d.Part0 = players.Character:WaitForChild('Torso')
			motor6d.Part1 = parts
		end
	end
	
	CutsceneService:PlayCutscene(VFXFolderClone:WaitForChild('CameraRig'):GetFullName(), "rbxassetid://16456154300")
	
end

Important Notes:

In the server script where it has this line: VFXFolderClone:WaitForChild('CameraRig'):GetFullName()

The way I have my rig set up is that all the parts I need for VFX is inside one folder, including the part the camera will track for the duration of the animation.

The reason why it’s :GetFullName() instead of just passing the actual instance is because sending full instances to the client from the server doesn’t work for some apparent reason.

In the VFXData script, there is an “End” function, this function is necessary, you don’t need to have the function to do anything but as long as it’s a function and inside the table then you’re good. (Plus it’s good practice to include a clean-up function somewhere right?)

Final Notes:

This module is 100% still in it’s early stages, I will be happy to include any contributions and bug fixes found by you guys. There is no documentation but I will hopefully make one (and properly comment the code lol) if I have enough time or this module becomes decently popular.

Links:

Github: https://github.com/jun-ro/Mango
Youtube (if you needed more clarification): https://www.youtube.com/watch?v=CrgT88OF7JM

Updates:

  • I’ve added support for multiple players, you can select from the player list to selectively play the cutscene for.

Credits:

Trove - @sleitnick
Loadstring - @kosukeReboyX

37 Likes

You just saved me so much time!! :smile:

Thank you so much and bless you for providing the developer community this excellent resource of yours. :slight_smile:

3 Likes

how to open?

30charrrrrrrrrrrrrrrrr

2 Likes

Wdym by open? Open the module? You can download the .rbxm on the github:
Here

3 Likes

Wait, Wait, Wait, what does this do??? Like “Mango is a module that allows developers to play cutscenes made in an animation setting (aka Moon Animator or Roblox Animation Editor) inside of your ACTUAL game! (meaning while testing)” What does that even mean, what does “cutscene” mean in this context, and what’s the difference of playing it not inside the game and inside the game.

2 Likes

Hello, thank you for asking.

First, I apologize for not having a clearer explanation of the module’s purpose.
Second, The module’s purpose is to allow developers to play cutscenes inside the actual roblox game client, notice how in the What does it look like portion, it’s just a simple test dummy doing an animation. That was played with Moon Animator; it of course would not transfer to the game with all it’s “moving parts” (the size of the white neon part increasing). This module makes it easier for you to still implement those “moving parts” while actually play testing, hence the video right under that is a video of me ACTUALLY PLAYING the game (or play testing wtv) and the cutscene still plays out just as it would in Moon Animator.

Hopefully this clears it up.

2 Likes

sorry for the boost, but i have another question. do i really need the animation id for the table for the name for the cutscene or can i just name it something else.

cause i want some animations in one of the functions, but there are an initiate animation.

is it okay if i change that in my version of the module.

1 Like

Go ahead man! It’s your own version of the module anyways, I just used animation IDs for an easier time loading in and playing animations.

thanks for the reply, i changed it. the cutscene service is great!

Tysm man really appreciate it :pray:! (If you want to publish changes you can send a pull request to the github and I’ll check it out :+1:)

i think your way of doing it was well, i just wanted to customize it. the loading the animation makes the cutscene load quicker. i have a animation variable in the module that has the animation that plays for the initiate.