I'm a tad stuck with local music playing on my Roblox game.
I've got a setup on my game where a script inserts five sound files into a player's GUI. When a sever is made these sounds do make it to the players gui.
To play the sounds there are parts setup that check for collisions with players and when they detect a player they will start one of the five sounds in the player's GUI.
This is what the code in one of the parts looks like:
script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild('Humanoid') then
if game.Players[hit.Parent.Name].PlayerGui.Sound2.TimePosition < 1 then
game.Players[hit.Parent.Name].PlayerGui.Sound2.Volume = 1
game.Players[hit.Parent.Name].PlayerGui.Sound2:Play()
game.Players[hit.Parent.Name].PlayerGui.Sound1:Stop()
game.Players[hit.Parent.Name].PlayerGui.Sound4:Stop()
game.Players[hit.Parent.Name].PlayerGui.Sound3:Stop()
game.Players[hit.Parent.Name].PlayerGui.Sound5:Stop()
end
end
end)
This script does detect players just fine as I have tested it. The system does work in the Roblox Studio testing area however when a server is launched with it none of the sounds are played.
The server does in fact set the sounds to playing and they appear as playing on the client side from the server side however the client side does not see them as playing and they do not play.
I do have filtering enabled turned on but this shouldn't effect it...