Tutorial page
This article is an easy tutorial.
All tutorials · Scripting tutorials
Scripting
This page is a tutorial about Scripting.
In this tutorial, we are going to make a sound effect for our game.
Required Instances
Scripting
We need two objects, a Script and a Sound, inserted into Workspace. Sound objects contain members for managing sounds. There is a property called SoundId, which is the id of the sound that is being played. More information on Sound IDs can be found here. Now the sound is in the sound object, but it doesn't play. In order to make it play, open the script, and type the following code:
workspace.Sound:Play()
This will cause the sound to play, and stop, automatically. This can be used anywhere to give your game a neat sound effect.
| Scripting (44) |
| ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| GUI (8) |
| ||||||||||
| Building (3) |
| ||||||||||
| Platform (8) |
| ||||||||||