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

I need a client side sound player, can someone fix this for me please?

Asked by 9 years ago

I want to make a client sided sound script, the script works perfectly like this:

local s = Instance.new("Sound")
s.Parent = game.Workspace
s:Play()
--Settings
-- Looped:
s.Looped = true
--Pitch:
s.Pitch = 1
--Sound ID:
s.SoundId = "http://www.roblox.com/asset/?id=138093919"
--Volume:
s.Volume = 0.4
--Time Position
s.TimePosition = 0

But not like this (This is the one i need fixed, thanks.)

for i,v in pairs(game.Players:GetChildren()) do
local s = Instance.new("Sound")
s.Parent = v.PlayerGui 
s:Play()
--Settings
-- Looped:
s.Looped = true
--Pitch:
s.Pitch = 1
--Sound ID:
s.SoundId = "http://www.roblox.com/asset/?id=138093919"
--Volume:
s.Volume = 0.4
--Time Position
s.TimePosition = 0


end

Answer this question