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

my sound environment scripts aren't working?

Asked by 6 years ago

hi, im trying to make sound environment scripts for my game but they only seem to work in studio mode and not in the actual game and when i jump the song repeats (i was using R6.) i used a localscript and placed them all in the StarterGui. i also put both of the sounds in the StarterGui. here is the code i got from a youtube tutorial:

script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild('Humanoid')then
 game.Players[hit.Parent.Name].PlayerGui.Sound2.Volume=1
 game.Players[hit.Parent.Name].PlayerGui.Sound2:Play()
 game.Players[hit.Parent.Name].PlayerGui.castlemusic:Stop() 
 end
end)

that script was to have Sound2 play when you walk into the house and for the castlemusic to stop. thanks in advance. from poopypigeon245

0
also i have filteringenable on poopypigeon245 22 — 6y
0
Use a RemoteEvent to play the sounds on the Client? I am not 100% positive that playing the sound from the server would result in a problem. But this is a good start. PreciseLogic 271 — 6y

Answer this question