I have a Gui with a button that has this script in it:
function onButtonClicked() game.StarterPlayer.StarterPlayerScripts.AudioVisualizer.Disabled = false end script.Parent.MouseButton1Click:connect(onButtonClicked)
The code looks good to me and there are no errors, yet every time I click the button on test mode in studio or in an actual server it has no effect. The script i'm trying to enable is a LocalScript and YES it is meant to be Disabled = false not true.
the script goes to game.Players.LocalPlayer.PlayerScripts when you play. You are just toggling the script in game.StarterPlayer.StarterPlayerScripts but not in the actual Player.
This script should be a LocalScript in the Button The script :
local Player = game.Players.LocalPlayer function onButtonClicked() Player.PlayerScripts.AudioVisualizer.Disabled = false --You asked it to be false end script.Parent.MouseButton1Click:connect(onButtonClicked)