Hi,

My audio player is not working to an extent. It's composed of two main, vital parts: the audio ID, and the target player, as seen here: https://prnt.sc/fjgn6d

While the specific audio I wanted to play is recognized and it plays perfectly, the music only plays for me - and not for the target player. The audio gets placed into the target player's backpack too, so I don't really understand why it won't work and only plays for me.

I believe it's a problem with the run script, so I'll post it here. If you need other scripts or believe that another script is the problem, please comment and I'll post it/them.

function onClick() --FYI, this is a LocalScript
	_G.s = Instance.new("Sound")
	_G.s.Parent = game.Players[script.Parent.Parent.TextBox.StringV.Value]
	_G.s.SoundId = "rbxassetid://"..script.Parent.Parent.AUDIOID.StringV.Value
	_G.s.Volume = script.Parent.Parent.VOLUME.StringV.Value
	wait(.1)
	_G.s:Play()
		if script.Parent.Parent.LOOP.LOOPED.Value == true then
		_G.s.Looped = true
	end
		end
script.Parent.MouseButton1Click:connect(onClick)

2 comments

0

Wha-.. backpack? Who uses backpack for sounds?

0

I already tried PlayerGui - apparently, sometimes, it doesn't exist in the player targeted. I know that Backpack works - as I've tried it on myself and in other games.