This is a local script, inside of a button, the names of the buttons are all correct and it will print the "1" but nothing else, the volume is set right i dont know whats wrong...? (I want the audio to turn off once clicked) Could somebody fix this script:
local Player = game:GetService('Players').LocalPlayer local PlayerGui = Player:WaitForChild('PlayerGui') local music = PlayerGui.Menu.Sound2 PlayerGui.Menu.Main_Menu.Menu_Background.Play_Button.Button.MouseButton1Click:Connect(function() print ("1") if music.Volume == 0.2 then print ("2") music.Volume = 0 print ("3") end end)