Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
2

how do i add music in diffrent areas?

Asked by 8 years ago

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 answer

Log in to vote
3
Answered by 8 years ago
function onTouch(hit)
    local character = hit.Parent
    local Player = game.Players:GetPlayerFromCharacter(character)
    local sound = Instance.new("Sound")
sound.SoundId = "-- replace this with a sound ID (keep the Quotes)"
sound.Parent = Player.PlayerGui
sound:Play()
end
script.Parent.Touched:connect(onTouch)


this should do it just add the script inside a wall the player can go through and make the transparency to 1

0
THANK YOU tordemask 15 — 8y
0
no problem and thanks for accepting my answer i go this answer from another person that helped me tordenask 1 — 8y
0
Fast one. User#11440 120 — 8y
0
yep i react quickply tordenask 1 — 8y
Ad

Answer this question