Okay so this is just some basic gui stuff but I ran into a error.
Here's what I have so far:
local Player = script.Parent.Parent.Parent.Parent.Parent
local Opened = Player.PlayerGui.GameBeta.HoldingFrame.Alliances.Opened
function onMouseButton1Down()
script.Disabled = true
if Opened.Value == true then
Opened.Value = false
print("Closed")
elseif Opened == false then
Opened.Value = true
print("Opened")
end
script.Disabled = false
end
script.Parent.MouseButton1Down:connect(onMouseButton1Down)
I am using a bool value I know that. I can't seem to find the error here currently all I want it to do is print in the output.
Thank you!

3 comments
the answer below is correct as you are disabling the script before it can run the code. Just remove that and you should be fine
Make sure this is a LocalScript. Server scripts don't run inside the player. If it is a LocalScript, the proper method of getting the player is game.Players.LocalPlayer.
It's in a LocalScript.