CutsceneService - Smooth cutscenes using Bézier curves

The code keeps saying this:

image

The error message says it, you tried to find the module in ServerScriptService and it wasn’t there. Use the correct path to the module.

1 Like

Sorry for the super late reply, I didn’t notice your post until now.
I just fixed the bug that you reported, it was just a simple variable mistake.

Hi, I’ve tried out your plugin today, but I don’t understand how to use queues. This is the code I’m using

local CutsceneService = require(game.ReplicatedStorage.CutsceneService)

local Part1 = workspace.Part1
local Part2 = workspace.Part2


local Cutscene = CutsceneService.CreateQueue(Part1, Part2)

task.wait(2)

Cutscene:Play()

It gives me the error

Next is not a valid member of Folder “Workspace.Part2”

You are attempting to put an Instance that is Object from workspace, It’s expecting the Created Cutscene which is what you’re supposed to add and not the parts.

Creating this should be done through plugins so i highly recommend checking the main tutorial, still works at the same way, you can try making a folder with Part numbers sorted but using plugins would be faster plus testing without having to play.

local CutsceneService = require(game.ReplicatedStorage.CutsceneService)

-- local Part1 = workspace.Part1(this is not necessary)
-- local Part2 = workspace.Part2 (this is not necessary)

-- Part is sorted by number once generated from  plugins 
local Cutscene1 = CutsceneService.Create(
        -- folder location, (e.g game.Workspace.CutsceneFolder) 
        -- EasingStyle and EasingDirection, (e.g "Enum.EasingStyle.Linear, Enum.EasingDirection.Out")
)

local Cutscene2 = CutsceneService.Create(
        -- folder location, (e.g game.Workspace.CutsceneFolder) 
        -- EasingStyle and EasingDirection, (e.g "Enum.EasingStyle.Linear, Enum.EasingDirection.Out")
)

local Cutscene = CutsceneService.CreateQueue(Cutscene1, Cutscene2)

task.wait(2)

Cutscene:Play()
2 Likes

Please read the guides or watch the tutorial video, you first have to create multiple cutscenes in order to create a queue. The queue will play these cutscenes successively.

1 Like


I love this module sm but everytime i cancel the queue i get this error

1 Like

nvm fixed it i forgot that i was using the old version of the module the new one fixed it

1 Like

Just returned from college today and saw this annoying bug displaying over again, not sure what causes it even though the numbers are correctly sorted out in the folder, never had this issue before until now

Another issue is instead of following Bezier path, now it tweens to the end in one line and note that im running on the new version (start to end but ignores all of the part except 2 parts)

EDIT: Turns out the Cutscene folder were corrupted since at College, i’ve now replaced this with the other ones and it’s now running fine but typing problem still occurs, demanding a fix for this.

I swapped the cutscene, worked again but still errors usually all the time so my game is currently broken due to this

Hey there, can you tell me again what errors occur after you fixed the folders? What is the “typing problem”?
It would also be helpful if you could provide your code.

the typing problem i specified is sometimes when the game (usually it loads for about 15 seconds and play the cutscene just fine) starts up and the remote fired, the error “More than one point is required” pops up even if there’s already more than 2 points, This was a cutscene i played before this comes into a common bugs on my game, i had to switch cutscene and spamming on “Play” button just to make it load and other one which starts at the middle of Cutscene point was apparently there aswell (it used to start playing at the first part) although using TweenService doesn’t seem to print nor stopping the code from running.

Before:

After:

right now I’m replacing it with TweenService to ensure nothing happens, unfortunately I’ll give the code tmr.

Please check exactly what the points argument is when you use CutsceneService:Create(). If it is a folder, print all the children. Also try printing Cutscene.Points.
This probably isn’t a bug of CutsceneService.

1 Like

Here’s a current code

task.wait(3)
--local data = {{CFrame = CFrame.new(-193.99823, 41.4631844, 25.5088673, -0.90181309, 0.0974058285, -0.421005189, -0, 0.974263906, 0.225410432, 0.432126522, 0.20327808, -0.878603816);Seconds = 0;Style = Enum.EasingStyle.Linear},{CFrame = CFrame.new(-87.4494019, 35.6617012, 38.2576447, -0.839819968, -0.1040176, 0.532806635, -0, 0.981471539, 0.191608518, -0.542865217, 0.160916656, -0.824259222);Seconds = 15;Style = Enum.EasingStyle.Linear}}
--local tween = game:GetService("TweenService")
--local camera = workspace.CurrentCamera

local playerSV = game:GetService("Players")
local tweenSV = game:GetService("TweenService")
local runSV = game:GetService("RunService")
local replicatclient = game:GetService("ReplicatedStorage")
local inputSV = game:GetService("UserInputService")

local localm = playerSV.LocalPlayer
local char = localm.Character
local border = script.Parent.Border
local border2 = script.Parent.Border2
local blank = script.Parent.blank
local warp = script.Parent.Warper
local gif = script.Parent.Warper.Animated
local txt = script.Parent.act_txt
local txt_tip = script.Parent.desc_map
local txt_title = script.Parent.title_map
local txt_diag = script.Parent.txt
local music_snd = script.Parent.loading_theme
local callGUILoad = replicatclient.game_evt:WaitForChild("CallGUIOnLoading")

local chosen_map_value = replicatclient.InRound.ChosenMap
local cloned_map = workspace:FindFirstChild(chosen_map_value.Value)
local folder_cut = workspace.jolder

local touchscreen = inputSV.TouchEnabled
local keyboard = inputSV.KeyboardEnabled

local run_loop = false

local tinfo = TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
local tinfo2 = TweenInfo.new(2, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)

local tinfo3 = TweenInfo.new(7, Enum.EasingStyle.Linear, Enum.EasingDirection.Out)
local background_fade = tweenSV:Create(blank, tinfo, {BackgroundTransparency = 1})
local icon_fade = tweenSV:Create(gif, tinfo2, {ImageTransparency = 0})
local snd_fade = tweenSV:Create(music_snd, tinfo3, {Volume = 0})
local CutsceneService = require(game.ReplicatedStorage.CutsceneService)




local jolder = CutsceneService:Create(
	workspace.jolder,
	15
)

local loopFOL2 = CutsceneService:Create(
	workspace.loopFOL2,
	30
)

local loopFOL3 = CutsceneService:Create(
	workspace.loopFOL3,
	30
)

local queueLOOP = CutsceneService:CreateQueue(jolder, loopFOL2, loopFOL3)



callGUILoad.OnClientEvent:Connect(function()
	blank.BackgroundTransparency = 0
	local children = workspace.jolder:GetChildren()

	for i = 1, #children do
		print(children[i].Name)
	end
	border.Visible = true
	border2.Visible = true
	warp.Visible = true
	txt_tip.Visible = true
	txt_title.Visible = true
	txt_diag.Visible = true
	gif.ImageTransparency = 1
	script.Parent.gif.Enabled = true
	blank.Parent.Parent.ScreenGui.Enabled = false
	txt_title.Text = "> "..chosen_map_value.Value
	music_snd.Volume = 1
	
	task.wait(2)
	music_snd:Play()
	task.wait(2)
	background_fade:Play()
	queueLOOP:Play()
	loopFOL3.Next = jolder
	
	--camera.CameraType = Enum.CameraType.Scriptable
	--camera.CameraSubject = nil
	
	
	
	task.spawn(function()
		task.wait(1)
		icon_fade:Play()
		task.wait(4)
		
		

		if touchscreen == true then
			txt.Text = "Tap anywhere to Deploy"
		elseif keyboard == true then
			txt.Text = "Press any key to Deploy"
		end
		inputSV.InputBegan:Connect(function(input, gpc)
			if input.UserInputType == Enum.UserInputType.Keyboard and run_loop == true then
				run_loop = false
				print("printed")
				txt["Mouse Click"]:Play()
				task.wait(1)
				snd_fade:Play()
				border.Visible = false
				txt_tip.Visible = false
				txt_title.Visible = false
				txt_diag.Visible = false
				warp.Visible = false
				border2.Visible = false
				queueLOOP:Cancel()

				script.Parent.gif.Enabled = false
				blank.Parent.Parent.ScreenGui.Enabled = true
			end

			if input.UserInputType == Enum.UserInputType.Touch and run_loop == true then
				run_loop = false
				print("printed2")
				txt["Mouse Click"]:Play()
				task.wait(1)
				snd_fade:Play()
				border.Visible = false
				txt_tip.Visible = false
				txt_title.Visible = false
				txt_diag.Visible = false
				warp.Visible = false
				border2.Visible = false
				queueLOOP:Cancel()

				blank.Parent.Parent.ScreenGui.Enabled = true
				script.Parent.gif.Enabled = false
			end
		end)

		run_loop = true

		while run_loop do
			txt.Visible = true
			task.wait(1)
			txt.Visible = false
			task.wait(1)
		end
	end)
end)

snd_fade.Completed:Connect(function()
	music_snd:Stop()
end)

also here’s every child it prints (somehow at first start it sorts the number correctly)
image

In your code don’t seem to be any bugs. Your version of the module is the latest (1.4.4) right?

In order to find out where the issue is, can you please print(queueLOOP) and send me everything it prints as a text (not as a photo)? Also please make sure that all tables are expanded in the output (you can enable this in the output settings).

The error you get is from a Play function that you call at line 32, do you call the queue there or a single cutscene? It seems to me that you call a single cutscene there, otherwise there would be a slightly different error. Can you please print that one as well?

That’s exactly a version I’m using as right now (i might hate the constant line but i atleast updated the module) so to prevent any bugs in the next API updates.

also with calling the Play function, it’s in a queue as I’m looping them until player presses a key or tap a screen so it’s playing in a queue and not a single cutscene, although my code doesn’t error in the main script so right now the error comes from a module which i assume just doesn’t initialize.

again I’ll send the outputs in the text tomorrow.

Yes in that module you probably play a single cutscene, not a queue.
If the error doesn’t come from the code you sent me, can you please send me the other one? And also print whatever cutscene/queue you are playing in that module.

already said that i didn’t play a single cutscene and i was playing a queue
anyways here you go with the outputs

table: 0xe5008e30fddcc0eb = {
   ["Completed"] = table: 0xd87ecf89a7ded67b = {
      ["_handlerListHead"] = false
   },
   ["Cutscenes"] = table: 0x8f946f0309d82bcb = {
      [1] = table: 0x8ad117db25b098ab = {
         ["Completed"] = table: 0x5a372742dfbd11bb = {
            ["_handlerListHead"] = false
         },
         ["Duration"] = 15,
         ["EasingFunction"] = "Linear",
         ["PlaybackState"] = Begin,
         ["Points"] = table: 0xabfa1212e031054b = {
         },
         ["Progress"] = 0,
         ["SpecialFunctions"] = table: 0x112e910275bcfa2b = {
            [1] = table: 0xd2e7efff403f89fb = {
            },
            [2] = table: 0xe32b3c802b9ee6db = {
            }
         }
      },
      [2] = table: 0x1ef13eb4b7dcd3fb = {
         ["Completed"] = table: 0xc31b7e7dfddeed4b = {
            ["_handlerListHead"] = false
         },
         ["Duration"] = 30,
         ["EasingFunction"] = "Linear",
         ["PlaybackState"] = Begin,
         ["Points"] = table: 0x5dd6b8d3db9ef35b = {
         },
         ["Progress"] = 0,
         ["SpecialFunctions"] = table: 0x10fcfbaa9d9cfdeb = {
            [1] = table: 0x79297ab7a9def0cb = {
            },
            [2] = table: 0x0a6f350cf3dcfa1b = {
            }
         }
      },
      [3] = table: 0x933bb41a7f00f2bb = {
         ["Completed"] = table: 0x2dde6790311ce90b = {
            ["_handlerListHead"] = false
         },
         ["Duration"] = 30,
         ["EasingFunction"] = "Linear",
         ["PlaybackState"] = Begin,
         ["Points"] = table: 0xdb61b34023e0d59b = {
            [1] = 1.43434882, 10.6345568, -145.089035, 0.00283241272, 0.118389465, -0.992963254, 1.51842833e-05, 0.992967188, 0.118389979, 0.999996006, -0.000350404531, 0.00281065702,
            [2] = 1.9009428, 10.4761333, -103.187134, -0.298228741, 0.111082032, -0.948008955, 4.96581197e-06, 0.99320519, 0.116376318, 0.954494774, 0.0347020105, -0.296202779,
            [3] = 23.6119251, 10.2400923, -62.4053116, 0.0142562389, 0.0297205932, -0.999456584, -2.87862495e-05, 0.999558151, 0.0297232009, 0.999898374, -0.00039497111, 0.0142508149
         },
         ["Progress"] = 0,
         ["SpecialFunctions"] = table: 0xf5d530ed0fdc1f3b = {
            [1] = table: 0xc28f6125601e9d8b = {
            },
            [2] = table: 0x8fcab17e3a18da5b = {
            }
         }
      }
   },
   ["PlaybackState"] = Begin
}

after trying about 13 times, finally i was able to spot a differences on the fully initialized time

--Fully loaded cutscenes which has points fully inserted but again, it has to be REPLAYED in order to let module insert points table but here i don't want players to vote restart a server if things keep happening.
table: 0xff267dc1b709c420 = {
   ["Completed"] = table: 0x6ef9805629b7e7b0 = {
      ["_handlerListHead"] = false
   },
   ["Cutscenes"] = table: 0x1e8b14ee1c1d0540 = {
      [1] = table: 0x553e0ae5a06f9fc0 = {
         ["Completed"] = table: 0x3584671c9b61e850 = {
            ["_handlerListHead"] = false
         },
         ["Duration"] = 15,
         ["EasingFunction"] = "Linear",
         ["PlaybackState"] = Begin,
         ["Points"] = table: 0xe7748adca1eb3620 = {
            [1] = -188.173538, 41.2136078, 55.3980103, -0.759506106, 0.266505122, -0.59340173, -2.25156546e-05, 0.912212908, 0.409716547, 0.650500238, 0.311195552, -0.692825198,
            [2] = -136.203552, 41.2078896, 41.2788239, -0.999404788, -0.0140257124, 0.0315190367, 1.16880983e-05, 0.91348815, 0.406865329, -0.0344988443, 0.406623513, -0.912944198,
            [3] = -97.9009933, 41.2174339, 48.8052406, -0.971050382, -0.0983445346, 0.217691958, -5.92693686e-06, 0.911330163, 0.411676198, -0.238875359, 0.399756998, -0.884948134,
            [4] = -53.8457069, 41.2345695, 61.559845, -0.95246911, -0.128054589, 0.27641502, -4.98816371e-05, 0.907426417, 0.420211017, -0.30463627, 0.40022409, -0.864302039
         },
         ["Progress"] = 0,
         ["SpecialFunctions"] = table: 0x465ad703192a6860 = {
            [1] = table: 0x95251022e2746080 = {
            },
            [2] = table: 0xc47e846df96d1d10 = {
            }
         }
      },
      [2] = table: 0x15d26b3fe3b13a30 = {
         ["Completed"] = table: 0x5a1d46660830b6c0 = {
            ["_handlerListHead"] = false
         },
         ["Duration"] = 30,
         ["EasingFunction"] = "Linear",
         ["PlaybackState"] = Begin,
         ["Points"] = table: 0x03afe05165bae190 = {
            [1] = -313.974792, 20.6476974, -279.116669, -0.545963883, 0.311925203, -0.777577221, 4.20212746e-06, 0.928109169, 0.372308195, 0.837808907, 0.203263521, -0.506715417,
            [2] = -290.626892, 17.86516, -222.224945, 0.519545078, 0.203317001, -0.829900742, -1.73896551e-05, 0.971279263, 0.237942383, 0.854443073, -0.123607352, 0.50462687,
            [3] = -253.33252, 17.4721432, -248.978256, 0.869321525, -0.0554825254, 0.491122991, 1.01514161e-05, 0.993681252, 0.112238936, -0.494246989, -0.0975667313, 0.863829017,
            [4] = -266.735352, 18.9493637, -302.862549, -0.430108547, -0.177860677, 0.885083199, 4.79519367e-05, 0.980395973, 0.197037429, -0.902777195, 0.0847899318, -0.421668172,
            [5] = -279.372192, 20.557209, -302.639313, -0.900859833, -0.197656304, 0.38650167, -1.04978681e-05, 0.890340924, 0.4552944, -0.434110105, 0.410152406, -0.802074552,
            [6] = -294.67688, 20.8510036, -273.860229, -0.00752794743, 0.388744593, -0.921314836, 2.85506248e-05, 0.921341002, 0.388755381, 0.999971628, 0.0029002279, -0.00694692135
         },
         ["Progress"] = 0,
         ["SpecialFunctions"] = table: 0xfa15d44107091f20 = {
            [1] = table: 0x9c902b5f6c793a40 = {
            },
            [2] = table: 0xace796b09e8ab3d0 = {
            }
         }
      },
      [3] = table: 0x0d8b6a9024bc94f0 = {
         ["Completed"] = table: 0x61ca57203a066780 = {
            ["_handlerListHead"] = false
         },
         ["Duration"] = 30,
         ["EasingFunction"] = "Linear",
         ["PlaybackState"] = Begin,
         ["Points"] = table: 0x2eb60b70e6833e50 = {
            [1] = 1.43434882, 10.6345568, -145.089035, 0.00283241272, 0.118389465, -0.992963254, 1.51842833e-05, 0.992967188, 0.118389979, 0.999996006, -0.000350404531, 0.00281065702,
            [2] = 1.9009428, 10.4761333, -103.187134, -0.298228741, 0.111082032, -0.948008955, 4.96581197e-06, 0.99320519, 0.116376318, 0.954494774, 0.0347020105, -0.296202779,
            [3] = -7.93220711, 11.096899, -57.3777237, -0.395039678, 0.145988956, -0.906990349, 4.04268503e-05, 0.987295151, 0.158897221, 0.918664396, 0.062733978, -0.390026689,
            [4] = -3.41324234, 10.7439814, -61.5302238, -0.207659721, 0.00654674647, -0.978179216, 2.68416479e-05, 0.999977648, 0.00668694079, 0.978201151, 0.00136235193, -0.207655191,
            [5] = 23.6119251, 10.2400923, -62.4053116, 0.0142562389, 0.0297205932, -0.999456584, -2.87862495e-05, 0.999558151, 0.0297232009, 0.999898374, -0.00039497111, 0.0142508149
         },
         ["Progress"] = 0,
         ["SpecialFunctions"] = table: 0x4f113e32d08f9170 = {
            [1] = table: 0x9fc34a63ae798b00 = {
            },
            [2] = table: 0x8f8c66d2bb9bf890 = {
            }
         }
      }
   },
   ["PlaybackState"] = Begin
}

When I play the cutscenes it gives a warning: “More than one point is required.” However, I have over 10 points in the first cutscene. Am I doing something wrong?

Don’t mind how messy the code is (This is my first time using the module)

local CutsceneService = require(game.ReplicatedStorage.CutsceneService)

local cutscene1 = CutsceneService:Create(
	workspace.Cutscene1, 10,
	"InOutSine"
)

local cutscene2 = CutsceneService:Create(
	workspace.Cutscene2, 10,
	"OutSine"
)

local cutscene3 = CutsceneService:Create(
	workspace.Cutscene3, 10, 
	"OutSine"
)


cutscene1:Play()
task.wait(10)
cutscene2:Play()
task.wait(10)
cutscene3:Play()

And even if I do this

local CutsceneService = require(game.ReplicatedStorage.CutsceneService)

local cutscene1 = CutsceneService:Create(
	workspace.Cutscene1, 10,
	"InOutSine"
)

cutscene1:Play()

It still gives the error

I really like this module, however since this module is already almost 4 years old, I decided to rewrite this. Would you mind if I made the V2 publicly available or would you like the source code through discord or something?

1 Like

Hi there, thanks for your contribution. Feel free to make it publicly available. :slight_smile:

1 Like