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.
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!
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.
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.
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.
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.
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”.
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.