how to make a cutscene in roblox This is a topic that many people are looking for. savegooglewave.com is a channel providing useful information about learning, life, digital marketing and online courses …. it will help you have an overview and solid multi-faceted knowledge . Today, savegooglewave.com would like to introduce to you Roblox Cutscene Script Tutorial. Following along are instructions in the video below:
A lot of people want to know how to make cutscenes in roblox. Very very very simple so firstly insert a part this is where the camera is going to at the start to begin with so. What you need to do is anchor.
The part that can collider to false and whether you make it transparent or not doesnt really matter. Im going to leave it half transparent for now so we can see it. But the most important thing is if you go to the surface tap in the properties window and you click on front surface so if you think of the camera.
Were going to position the camera to be in this position. So its going to be looking at where the front surface is so if you do that and you just position the front surface to be rotated and positioned in the way you want it to be so the front surface will be wherever. The camera is going to face okay.
So when youve got your first one lets just name it you know test one lets insert another part and what you can do actually is set the front surface to a motor. So you can actually see it its now pointing out from the front surface you can see that its going to be in this direction. So lets just duplicate this and put it somewhere else over here for example.
So now weve got our two parts. Im going to name this one part two lets go ahead and script them okay so to make a tween. Its very simple we have to do it in a local scripts.
Because the camera is controlled locally on the client for each player so in our local script. Ive put it in the starter gui. We firstly have to make a variable for the tween service.
Then im making a variable for the camera. Because thats what were gonna be animating and im also creating a variable for the length of the cutscene so if you want it to last 12 seconds keep it at 12. But change it to the amount of seconds.
You want then i set up between info. Now this is required to tell the script. What our tween should look like so we have to give it the time which is going to be in seconds.
Ive just passed the variable then a comma to separate from everything else then the style. So what the animation will look like you can choose from a predefined list. Ive chosen sine or there you can choose any of these have a play with them easing direction.
You have to choose in or out or in out not shake it all about so choose one of these and that just determines. The way that the animation plays so does it go from you know just go from backwards. You know and plays it the other way around so.
Ive kept it a tap out and then weve got the repeats count so whether it will repeat itself. I dont want that so ive set to zero. Then this false is gonna be whether it reverses obviously its not going to repeat.
So it cant reverse. So thats false and also zero is the delay time so if you wanted it to delay once its got there before it goes back if you did repeat it youd put an amount of seconds in there. But what ive done is ive created a function and its called tween and it will take two arguments part one and part two so part one is an object and so its part two and part one is going to be the part where the camera starts off at so.
We firstly have to set the cameras camera type to be scriptable. So its an enum and when he set it to scriptable thats allowing you to edit the camera with the scripts. If he didnt do this it wouldnt work properly because the camera wouldnt go from part one.
It would go from your character. So once weve set a descriptor ball. Were then able to change the c frame.
So the position and rotation of the camera to be looking at part one so the way that part one is facing so if you imagine because its fate is going to be looking from the front surface going outwards. It would be looking here okay so then we create the tween. We give it the camera.
Because thats the object which were going to change the properties of in this case. Well be changing its c frame property. Were going to give it some tween info.
So this is the info. Weve created to tell the scripts how the tween is going to animate and what it will look like and then this table here. The third argument is the list of properties.
Which were going to change. So were only going to change the camera c frame. Were telling the script that we want to move the camera to part two c frame.
So if part two was over there. Well the script would would just animate it like this. And it would just find the fastest route to get to this part to get to the second part c frame.
And it will smoothly animate it because weve given the tween info. Which tells us how long it should last for the style of the animation. Etc so we then play the tween and then we have to wait 12 seconds.
Because this doesnt yield as soon as we press play and we start the tween. It will just move on to the next line of code. Which would be to reset the camera to be looking at your character.
Again. We dont want to do that straightaway. We need to wait the length of the cutscene so have the weights with the same amount of time after the tween between code and play then well wait the 12 seconds before it resets the camera.
When it sets the camera type it back to custom. So outside of the function. Im just waiting two seconds to allow the player to spawn in and then calling the function.
And im passing through the two parts so game dot work space test. 1. Is where the camera will start off and game dot.
Work space. Test2 is where its going to end up. So let me go and show you this now and we wait the two seconds.
So that we can spawn in you can see. The camera is now smoothly transitioning to the second part so really really cool and of course. You can edit and change it so it could be starting over here.
And you know we could have it just a part over here just to show you the camera moving and if we just go in and change. The length maybe to ten like this and we start it up again. Youll see the just really smoothly.
Animates once again from the first part to the second part just like that and youve got a really lovely cutscene. So obviously you dont have to you dont you have to keep these these parts visible you can just make them transparent as long as theyre anchored. So they stay in position and can collide is false so you cant collide with them.
Which is really important to know that the camera will be looking at whatever the front surface of each part is going to be looking at and if you wanted to do this you know multiple times just keep calling this tween function. So for example. If you wanted to do it.
Again from going from test to two then another part called test three just put another part in there call. It test three and well just change. The name test three and youve got that second function cool.
So once the first tween is done and with the camera is now at test two you can put it to test three so lets go and give that a try and set the cutscene to three seconds for now here. We go ghost one and then it goes to part two just like that pretty awesome huh. And you might want different times for you know different tweens.
So you could move the cutscene time and the whole tween info stuff into the tween function. Like this so. Its a different cutscene.
Time. And you could have an argument called lets call it cutscene time you cant use the word time because thats using scripting for something else. But you could then just get rid of this variable and change.
The cutscene time in between info to the cutscene time argument is now in the tween and then if you passed the timer you would see one second for the first ten second for the second and it would go at different speeds. So the first tween should be really fast. Whereas.
The second one shouldnt be see really fast and then really really long so thats how you do tweening in roblox with the camera. I hope you found this useful do check out my video on see frames. It should make it easy to understand.
And yeah please like the video subscribe if you enjoyed it share. It with a friend and ill see you in the next one thanks for watching. .
Thank you for watching all the articles on the topic Roblox Cutscene Script Tutorial. All shares of savegooglewave.com are very good. We hope you are satisfied with the article. For any questions, please leave a comment below. Hopefully you guys support our website even more.