Basically, I want the sound to play if it meets the condition that IsActive is equal to 0. This works inside of testing mode on studio but does not when I play normally.
I already tested until the PlayerGui actually loaded.
--localscript inside of StarterGui>ScreenGui
--IsActiveInt is an integer value in Workspace
local player = game.Players.LocalPlayer
local menusound = script.PausedSound
local clicksound = script.ClickSound
IsActiveInt = game.Workspace.IsActive.Value
local PlayButton = script.Parent.Frame.MainMenu.PlayButton
local ShopButton = script.Parent.Frame.MainMenu.ShopButton
local TutorialButton = script.Parent.Frame.MainMenu.TutorialButton
local LoadingScreen = script.Parent.Frame.LoadingScreen
wait(3)
function check()
if IsActiveInt == 0 then
menusound:Play()
end
end
check()
Thank you, Gianni

3 comments
So the problem was that I was referencing the child of the objects before it loaded?
Yeah, most likely.
That's almost always the reason why something works in studio but not online. Things aren't loaded or people don't know how to use FE.