You could go the way you talked about with using a bindable event, or you could just include the sound in the same script that makes it appear. And for the closing, if you have a button that closes it, just put in the script to play the sound.
This tutorial covers:
Tutorial 3: Noob Boy Part 1
Sound Functions
I've never play Roblox. But I've decided, the best way to learn this, to just jump in. Let's say I was a creator, let's say I design my own game. How am I going to make a few bucks out of here? I create my own game I create my design, and this is me ...
1:177:59Roblox Scripting Tutorial: How to Script a Music Player - YouTubeYouTubeStart of suggested clipEnd of suggested clipAfter it and it would give you this string of numbers and all you do is you put that number in hereMoreAfter it and it would give you this string of numbers and all you do is you put that number in here and then it'll basically load up the sound and it'll be ready for us to play inside of our script.
Not all scripts work in all Roblox games. If you want to find a specific script to use, you'll need to crosscheck which Roblox game works for it and which script injector can run it. Download the script and start the script injector.
Roblox platforms provide creators and developers to upload audios to make their experiences immersive and dynamic. Adding audio to your experiences such as background music, narration, sound effects, and more!
Scripts are lines of code that contain instructions for a game or program to follow. In Roblox, scripts can be used to do everything from giving (or taking away) a player's health points, making objects move, or anything you can think of. Roblox uses a programming language called Lua.
Scripts are usually safe. Do you want to allow scripts to run? This message is NOT IN RELATION TO THE INTERNET EXPLORER script issue that other threads have covered.
In Roblox, a Lua virus is a type of malicious script that, when executed, replicates itself by modifying other parts and inserting its own code. When this replication succeeds, the affected areas are then said to be "infected" with a virus.
Indeed. Your account can get banned. You might be sued. You could be forced to pay a fee.
In a nutshell, Roblox has removed audios/music from experiences because of the new & major privacy settings changes. This has been done to protect the rights of the content creator and most likely, also to protect the platform from copyright-related issues.
As of December 1, 2016, the audio limit has been increased to 7 minutes. On an unknown date in late 2018, the cost for audio was changed to 35 Robux instead of 75 for audio length ranging from 59 seconds to 2 minutes. Later in 2019, the cost for that length is now 70 Robux.
Lua is a powerful and fast programming language that is easy to learn and use and to embed into your application. Lua is designed to be a lightweight embeddable scripting language. It is used for all sorts of applications, from games to web applications and image processing.
Math is extremely useful in scripting.
How Long Does It Take to Learn Lua? It takes 2–3 days to learn the basics of Lua, and 3–4 weeks to know enough to use it professionally. Lua's syntax is simple and fairly easy to learn.