So thats what i want to do this haven't been solved 2 weeks ago because nobody answered so im posting this again... What i want it to do is when u pass a trigger song plays. When u pass another trigger it stops and plays a new song. Like a biome changer song.
Trigger1
script:
local brick = script.Parent
local sound = script.Parent.Forest
debounce = false
brick.Touched:connect(function(hit)
player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player and not debounce then
debounce = true
player = sound:Clone()
player.Parent = player.PlayerGui
player.Snow:Stop() -- < If song was already in biome stops it
player:Play()
wait(0.1)
debounce = false
end
end)
Trigger2
script:
local brick = script.Parent
local sound = script.Parent.Snow
debounce = false
brick.Touched:connect(function(hit)
player = game.Players:GetPlayerFromCharacter(hit.Parent)
if player and not debounce then
debounce = true
player = sound:Clone()
player.Parent = player.PlayerGui
player.Forest:Stop() -- < if song was already playing stops it
player:Play()
wait(0.1)
debounce = false
end
end)
the thing is it doesn't work gives me PlayerGui is not a valid of Sound or something like that... idk help me please! i am lost and i really need assistance, this is an important script thank you all very much i appreciate for your work !

1 comment
can you please post the exact error?