Recently I’ve been working on a RPG game. I want to make a backstory cutscene but I don’t know how. Do I need to animate it in Moonsuit or does it need to be scripted?
Honestly I prefer to script it. Here’s a simply way to do it:
Creating the Cutscene Camera
First you will need to create a part (obviously), move it wherever you want.
Then, change the size of the part to 0.5,0.5,0.5
(or something else).
Rename the part to Point1
(or something else).
Then duplicate our part (Select it, CTRL+D)
, move it to wherever you want; this will be the end of our cutscene(rename the part to something different).
Make sure the cameras are anchored
, their Transparency
set to 1
and CanCollide
set to false
.
Scripting
Place a LocalScript
under StarterPlayerScripts
(StarterPlayer>StarterPlayerScripts
). Then, rename the script to whatever you’d like; this will be our CameraScript
.
You should write something like this:
local Camera = workspace.CurrentCamera
local Player = game.Players.LocalPlayer
local Character = Player.Character
local Point1 = workspace.Point1
repeat
wait()
Camera.CameraType = Enum.CameraType.Scriptable
until Camera.CameraType == Enum.CameraType.Scriptable
Camera.CFrame = Point1.CFrame
You can test it, and you will see that the camera view is on the Point1
.
Now, create another LocalScript
and place it on StarterPlayerScripts
; rename the script to CutsceneScript
(or something else).
You should write something like this:
local Camera = workspace.CurrentCamera
local Player = game.Players.LocalPlayer
local Character = Player.Character
local Point1 = workspace.Point1
local Point2 = workspace.Point2
local function TweenCamera(Pos)
local TweenService = game:GetService("TweenService")
local TweenInf = TweenInfo.new(5, Enum.EasingStyle.Quad, Enum.EasingDirection.Out, 0, false, 0)
local Tween = TweenService:Create(Camera, TweenInf, {CFrame = Pos})
Tween:Play()
end
wait(5) -- wait 5 seconds after the player joined the game
TweenCamera(Point2.CFrame)
Test it and… BOOM! It will play our cutscene!
Hope you have learned something new (also let me know if this doesn’t work!)
I’ve had quite a bit of experience with this and to answer your question, its a bit of both. obviously the most important thing for a cutscene is its camera in which the best way ive found to animate it is by rigging a part for the camera to follow.
I’ve attached a quick rig I made which you can make attach the camera to
CameraRig.rbxm (3.6 KB)
Now to animate this rig you can open up Moon Animator and make a new file. To add the rig click Item, Add Item and then select your camera rig and click ok.
Now that your rig is added, you need to attach your camera to the part while animating. To do this click camera, Add camera. There is now another item added to your menu named camera.
To attach the camera to the part, click the spanner icon on the new camera item and make sure AttachToPart is ticked.
Now finally clicking on the new AttachToPart row and pressing = will add a new keyframe. Click the keyframe, press 7 and at the top there will be a “Value” option. Click it and set the value to the CamPart and press ok, now your camera is attached to the part when you play the animation!
Once youve finished animating the camera you can export the animation by pressing Item,Export all and in your explorer will be a keyframeSequence and a folder Named something like camera. Right click the keyframe sequence and click save to Roblox which will save it as an animation to Roblox which you now can use by loading the animationId onto the Camera rigs Animation Controller!
To actually attach the camera to the part in game we will have to have a RenderStepped loop updating the camera’s CFrame every frame to the CamPart’s CFrame, which should be easy enough to do.
-
Add a RemoteEvent in ReplicatedStorage named “ChangeCamFocus”
-
In a Local Script under StarterCharacterScripts write:
local plr = game.Players.LocalPlayer
local char = plr.Character
local stepped
local cam = workspace.CurrentCamera
local runservice = game:GetService("RunService")
game.ReplicatedStorage.OnClientEvent:Connect(function(CamFocus)
if not currentCamFocus:IsA("Humanoid") then
cam.Focus = CamFocus.CFrame
cam.CameraType = Enum.CameraType.Fixed
cam.CameraSubject = CamFocus
stepped = runservice.RenderStepped:Connect(function()
if not CamFocus:IsA("Humanoid") then
cam.CFrame = CamFocus.CFrame
end
end)
else
if stepped ~= nil then
stepped:Disconnect()
end
cam.CameraType = Enum.CameraType.Custom
cam.FieldOfView = 70
cam.CameraSubject = char.Humanoid
cam.Focus = char.Head.CFrame
end
end)
How this works is when you set the parameter “CamFocus” to something other than a humanoid, it will set the camera CFrame to the part, else it will set the camera back to normal. So to Fire our Cutscene camera Animation what we can do is:
local CamAnim = CameraRig.AnimationController:LoadAnimation(CameraAnimation)
CamAnim:Play()
game.ReplicatedStorage.ChangeCamFocus:FireClient(player,CameraRig.CamPart)
With some added effects and animations of other rigs your cutscenes will look great!
Heres a little example of one I made by using this method:
If youre having any issues I’d be glad to help out!
Thanks for helping! How do you animate more than just the camera? Like moving parts, character, and time and day.
If youre just getting into animation or just need some simple ones i recommend using moon animator (Moon Animator 2 - Roblox)
animating and exporting a characters animations is pretty much the same as doing the camera. To insert an animatable rig you can use Moon’s built in character inserter
Try my plugin, the gui sucks but it works. And its also abandoned so… keep that in mind
https://www.roblox.com/library/6205079504/Quantum-Cutscene-ALPHA?ViewInBrowser=true&CreatorId=1746766484&SearchId=5B996977-5EAF-47A0-805B-EF7754DEBC0F&Category=Plugin&Position=21&SearchKeyword=&CreatorType=User&SortType=Relevance
Some stuff is broken (preview cutscene)
Hey, I’ve noticed that shift-lock messes the cutscene up. Any solutions for this problem would be helpful.
Yes, you can turn off AutoRotate in humanoid
i had an issue:
- when i play the cutscene, the model was at the place i originally created and was not at my position
I was following your tutorial, but I got some underlines under some part of codes. Can you make uncopylocked game, so I can take look myself?