local PlayButton = -- Path to Button here
if PlayButton.Visible = true then
for _, v in pairs(game.Players.LocalPlayers.PlayerGui:GetChildren()) do
if v ~= PlayButton.Parent then -- Or the GUI the Play Button is located in
v.Enabled = false
end
end
else
PlayButton.MouseButton1Down:Connect(function()
for _, v in pairs(game.Players.LocalPlayer.PlayerGui:GetChildren()) do
if v ~= PlayButton.Parent then
v.Enabled = true
else
v.Enabled = false
end)
local PlayButton = -- Path to Button here
if PlayButton.Visible == true then
for _, v in pairs(game.Players.LocalPlayers.PlayerGui:GetChildren()) do
print(v.Name)
if v ~= PlayButton.Parent then -- Or the GUI the Play Button is located in
v.Enabled = false
end
end
PlayButton.MouseButton1Down:Connect(function()
print("Player Clicked!")
for _, v in pairs(game.Players.LocalPlayer.PlayerGui:GetChildren()) do
if v ~= PlayButton.Parent then
v.Enabled = true
else
v.Enabled = false
end)