Cutscene not playing yet no errors in scripts

Greetings,

So I was following a tutorial and showed how to trigger a cutscene. In my case, I’m trying to make it so when you press the button that opens up the fence in the control room, a cutscene gets triggered showing the fence opening. The scripts don’t show any errors on any line and I believe I followed everything right but am probably placing something in the wrong spot. The fence still normally opens after clicking the button but the cutscene doesn’t play along with it for some reason.

Cutscene folder in Workspace
image

The remote event in ReplicatedStorage
image

local script in StarterGui
image

The code in it

The button model in Workspace
image

The code in the “Main” script shown above


The cutscene camera facing the fence that’s supposed to play

Footage showing the cutscene not playing as the fence opens

The scripts don’t seem to show any sign of errors but for some reason the cutscene still won’t play, am I misplacing the “game.ReplicatedStorage.CutsceneEvent:FireAllClients()” line in that one script? I’d appreciate any help as I mostly guide myself off of scripting tutorials!

3 Likes

Just based on first glance it appears you’re misplacing where you fire all the clients. You’re firing to all clients within the loop, 60 times with an interval of 0.05 seconds between them…

You might want to put it right after Debounce = true on Line 13 and give that a try.

1 Like

It seems to not have changed much, still gives the same results as shown in the clip.

1 Like

Another thing, why are you running script:Destroy() on line 51? That’s going to get rid of the entire script and it won’t work anymore after a single button click.

1 Like

Yes, the model was originally a SCP gate model with 2 buttons one on each side but I changed up the appearance of everything and transformed it it into a fence that opens with a button that only works once after clicked so the fence stays open forever to come back to the area if you want. The script:Destroy() in line 51 destroys the script so the button stops working after clicking on it once. Don’t mind it, but my biggest concern is the cutscene not playing when everything seems to be right and the change you suggested to make to the script didn’t really change much with the same results.

1 Like

in the localfolder you say
game.replicatedstorage.removeevent.cutseneevent
in the script you trigger
game.replicatedstorage.cutsceneevent

1 Like

May you elaborate more please? I’m having a hard time understanding exactly what changes you’re suggesting me to make.

on line 45 in the server script you are doing

game.ReplicatedStorage.CutsceneEvent:FireAllClients()

in the localscript on line 11 you are doing

local remoteEvent = game.ReplicatedStorage.RemoveEvents.CutsceneEvent
ReplicatedStorage.CutsceneEvent:FireAllClients() -- the script line 45
ReplicatedStorage.RemoveEvents.CutsceneEvent -- the localscript line 11

these are not the same event

Wouldn’t it have shown some underlined an error indicating that things don’t match though? What are the changes that I should be doing though is what I want to know, I feel like I’m misplacing something that’s not allowing the cutscene to play. Once again though, I don’t specialize in scripting so I wouldn’t know right away what could be wrong.

somewhere inside replicatedstorage is a remote event called “cutsceneEvent”
make sure both the local script and the server script have the same path

What would it look like based off from what you seen in the screenshot? I’m not the best in understanding things like this.

i am not going to write the script for you XD
the info that you need to fix the issue is in the previous posts.

you can do it :smiley:

No one is asking you to write any scripts, the scripts are already there. What I need is some guidance on where to adjust the line of code in the button script that’ll trigger the cutscene after pressing it. The changes you suggested in the previous replies only gave errors.

If I could do it then I wouldn’t have made this topic, with all respect you’ve been serving no use to this problem besides suggesting errors and not helping fix those. Please don’t waste my time and yours replying on a topic you’re not willing to do much for, with all respect. Once again, I’m not that experienced in scripting and would appreciate some clear guidance besides a “You can do it”.

1 Like

What errors are you getting now?

Well, some line was underlined in red but I reverted back to how everything was written in the screenshots just to make sure. I’m honestly starting to feel hopeless as this is something that is easy to fix yet am not experiencing enough to know how to adjust the code to trigger the cutscene to play. I’d appreciate some “help” as the past 2 scripters on this topic just gave up, I really need some help.

Can you screenshot everything in Replicatedstorage (the hierarchy). Someone already pointed this out but you’re referencing 2 different remote events in your local script and script.

Also, whenever something isn’t working and there aren’t any errors, you should try adding random prints after every if statement, etc in order to see what’s specific part isn’t running.

Here’s everything that’s stored inside ReplicatedStorage

image

Thanks for the tip, I’ll make sure to keep that in mind too!

In your local script after line 11 when you’re referencing the RemoteEvent. Could you add a print like print("ran", RemoteEvent).

Could you also add a print right after you fire game.ReplicatedStorage.CutsceneEvent:FireAllClients().

Also for both scripts can you add a print at the start and bottom to see if they are actually running.

Tell me what those prints.

Looks like it didn’t print it, here’s what the script looked like

Though when I opened up the Output more, I did find an error relating to the local script “CutsceneScript”

It unfortunately did not run either but here’s what the script looks like after adding a print after that line

image


Also, everything worked when I clicked the button to open the fence because it printed but the cutscene still didn’t get triggered for some reason.

In the local script can change it to reference the same remoteEvent as the server script is.

So change it to:

local RemoteEvent = game.ReplicatedStorage.CutsceneEvent
print("ran", RemoteEvent)

Might be typos above. Also, change the prints so they all aren’t printing the same thing. That way its much easier to see whats running and whats not.