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

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

Asked by 5 years ago

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
0
Because you used Play Solo User#19524 175 — 5y
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 User#19524 175 — 5y
0
Oh ok I understand now thanks for the fast reply m8 :D wafflesforall 4 — 5y

1 answer

Log in to vote
-1
Answered by 5 years ago

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

0
This should be a comment. User#19524 175 — 5y
0
That won't change anything GGButNO_RE 61 — 5y
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. saSlol2436 716 — 5y
Ad

Answer this question