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

LocalScript makes sound play across server? (Solved)

Asked by 4 years ago
Edited 4 years ago

[Nevermind I just made a clone of the sound and that worked]

I have a setting button in my game where, if you click it, you can turn the background music on or off. It's a local script, so I'd think it'd only turn it on for the person clicking the button, but it seems to affect the whole server. This is what's inside the local script (which is inside a textbutton)


script.Parent.MouseButton1Click:Connect(function() if workspace.LocalSounds.TGS.Playing == false then workspace.LocalSounds.TGS:Play() script.Parent.Text = "Background Music: ON" script.Parent.BackgroundColor3 = Color3.fromRGB(20,141,255) elseif workspace.LocalSounds.TGS.Playing == true then workspace.LocalSounds.TGS:Stop() script.Parent.Text = "Background Music: OFF" script.Parent.BackgroundColor3 = Color3.fromRGB(203, 6, 36) end end)

LocalSounds is just a folder by the way.

Answer this question