How would I call in a map for a cutscene only? I do not want the area constantly loaded for performance reasons. This area is only used for a cutscene when a player first joins.
Video shows the area I want to hide and the main map.robloxapp-20210501-2316141.wmv (685.0 KB)
1 Like
-- Assuming you have a Remote for the cutscene, or some kind of event
Remote.OnServerEvent:Connect(function()
game.ServerStorage.CutsceneMap:Clone().Parent = workspace
-- Cutscene ends
workspace.CutsceneMap:Destroy()
end)
1 Like
I do not have a remote for the cutscene setup, I just have a local script alongside the other stuff needed inside of the StarterGui. I am new to this stuff, Where would I start on adding a remote? Sorry I am new to scripting things.
1 Like
If you want to do it locally, that’s fine as well.
Just put the CutsceneMap into ReplicatedStorage and do this:
local Map = game.ReplicatedStorage.CutsceneMap:Clone()
Map.Name = "CutsceneClone"
Map.Parent = workspace
-- Cutscene ends
Map:Destroy()
I can’t get it to work.
Here is how I have it set up
What am I doing wrong?
Here is my code for the cutscene
(removed error cause it was due to something I overlooked)
So you want the cutscene to play when the Player clicks ‘Play’, right?
No, I have it setup so the cutscene plays upon joining and the play button pops up once the cutscene has finished its path and stopped. here is a video, the issue is the map for the cutscene not appearing
robloxapp-20210502-0007454.wmv (935.1 KB)
I didn’t see this in your code?
local Map = game.ReplicatedStorage.CutsceneMap:Clone()
Map.Name = "CutsceneClone"
Map.Parent = workspace
-- Cutscene ends
Map:Destroy()
Did you forget to put it in?
I Have it here in “delmap”
Is that the problem? I wasn’t sure on where to put it so I just made it a separate script
1 Like
The problem is that you didn’t put waits of any sort in the script, (I think), so it just immediately Clones and deletes. You’ll need to use BindableEvents to communicate between two scripts.
The wait was the problem lol, Thanks for your help!
1 Like