i would like to know how to do so i really wanna know and if its already answered then im sorry but i wouls really like to actully know how it is done for example in a obby when you go on a area for example final five then i want to music to change to something dramatic to the soundtrack so the player can really know that the person is on the last few stages just like super checkpoint
1 | function onTouch(hit) |
2 | local character = hit.Parent |
3 | local Player = game.Players:GetPlayerFromCharacter(character) |
4 | local sound = Instance.new( "Sound" ) |
5 | sound.SoundId = "-- replace this with a sound ID (keep the Quotes)" |
6 | sound.Parent = Player.PlayerGui |
7 | sound:Play() |
8 | end |
9 | script.Parent.Touched:connect(onTouch) |
try this. Just make a uncollidable wall and stick this in it as a script. It should work.
Well my way of doing it is making a wall on that platform and then when the player touches it it changes the music.
1 | local sound = --URL of Sound ID-- |
2 |
3 | script.Parent.Touched:connect( function () |
4 | sound.Play = true |
5 | end |
hopefully this works I didn't really test this, my friend gave it to me.