Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Audio doesn't play in game just in studio? .~.

Ok so when I tested the script in studio it worked fine, but then when I went in game it didn't play the audio. I looked for many solutions and failed, if any of you know how to fix it please tell me how, I would really appreciate it. :)

repeat wait() until game.Players.LocalPlayer.Character

while wait() do
			for i,v in pairs(game.Players:GetChildren())do
			if (v.Character.Head.Position - script.Parent.Position).magnitude <= 100 then
			game.Players.LocalPlayer.PlayerGui.Rain.Volume = 0.5
		else 
			game.Players.LocalPlayer.PlayerGui.Rain.Volume = 0
			end
			end
			end

3 comments

0

Because you used Play Solo

0

You used the blue Play button with a roblox character, that is Play Solo. In that mode, the client and server are not separated

0

Oh ok I understand now thanks for the fast reply m8 :D

1 answer

Put it in a local script. That's all to it.

3 comments

0

This should be a comment.

0

That won't change anything

0

It would probably will change it if the script is a ServerScript and it is in one of the Client Services or under a GUI. However, I strongly agree that this should've been a comment.

This discussion is preserved as it was. New answers, comments, and votes are closed.