Hi YouTube! I'm going to be showing you how to make a music player button! Let's get right into it!
Now open up a baseplate or one of your world's you already made. It don't matter.
It's slow for me. Sorry.
Told ya.
Ok, it loaded up finally. Now let's get into it.
I get my self set up quickly.
Make sure to have Explorer and Properties open for this.
Now, insert a part.
Just like that.
Now copy exactly what I do from here.
I just put the surface input like that. Don't copy that.
And make sure to have toolbox open and go to audios.
Forgot to put the stop button color to red. My bad.
Insert a script inside of the "Play" Button.
Don't forget to insert a "Click Detector" Inside of the play button as well.
Very Important!
Now copy what I script.
Copy this.
Now to insert the function to make the Button actually work. Copy!
Exactly this.
There's the Play button script complete.
Make sure to have the sound that you picked out on looped!
Let's test it.
Works! :D
Now to script the Stop Button. Yes there's more.
Basically the same thing like the play button. The script is a bit different though.
Forgot to insert a click detector inside of the stop button.
Copy this main script I put. It hast to be out of the function. Like how I'm doing it.
Copy this.
Now to put the stop part in the script. Make sure to put it inside of the function.
Just like this.
Now the button's are completely done!
Don't forgot to anchor them or they will go flying around if you step on them.
Time to test them out.
Không có nhận xét nào:
Đăng nhận xét