Click play to end cutscene and spawn in

That would be correct, now test to see if theres any errors

The camera did not switch to the player camera and the gui is still there.

In the other local script
did you fully connect the Tween function?

How would I check if I did that?

To connect a function you’ll put tween() to run the function

(and put this at the end of the script)

And what would I put at the end of the script?

image

At the end of your script you would place it

Like this if it goes under the camera script

put the loop or function that plays the cutscene inside a coroutine and connect your playbutton to a mousebutton1clicked event to close said coroutine

Can you record a video or take screenshots on how to do that please?

local CutsceneCoro = coroutine.create(function()
   --place your cutscene code here
end)

coroutine.resume(CutsceneCoro) -- Start running coroutine, they don't start by themselves

PlayButton.MouseButton1Click:Connect(function()
   coroutine.close(CutsceneCoro) -- Close the coroutine so it stops running your cutscene code
   --Place the code that spawns the player here
end)

Take a look at the docs
https://developer.roblox.com/en-us/api-reference/lua-docs/coroutine

1 Like

Do I just place this in the cutscene local script, then put the cutscene code in that place?


PlayButton is underlined and what would I script to make the players not spawn until they click Play??

First of all, the blue underline means your variable “PlayButton” is not defined. I only gave you pseudo code that you should build off of and not copy entirely. To fix it you just have to define your playbutton

local PlayButton = --path to your playbutton

Playbutton.MouseButton1Click:Connect(function()
-- do things
end)

If you want the player to not spawn until they press play there isn’t really a way to do that. But you can use the method of when the player joins, teleport their character to an invisible box of some sort 1 million studs away from the map so they don’t see themselves and when they press play then teleport them back to the map and end the cutscene

I now have the play button end the cutscene but the players spawns as an invisible player who canf move.

Can you show the entire script?

I have a new topic that has progress. Here is the link: Click play to end cutscene and spawn in - #68 by 1PixeI1