local player = game.Players.LocalPlayers
local open = script.Parent
open.MouseButton1Click:Connect(function()
open.Visible = false
plr.playergui.AnimationsGui.Enabled = true
end)
Or you could just do a easy easy easy script
a local script inside of the button and put
script.Parent.MouseButton1Click:Connect(function()
if script.parent.parent[parent until you see your frame or GUI].Visible OR Enabled == false OR true then
script.parent.parent[parent until you see your frame or GUI].Visible OR Enabled = false OR true
end)
very bad explaining, ill just drop an example of my button and you remake it
script.Parent.MouseButton1Up:Connect(function()
if script.Parent.Parent.Parent.RANK.Visible == false then
script.Parent.Parent.Parent.RANK.Visible = true
end
end)
--- IF ITS A GUI THAT YOU'RE TRYING TO DISABLE/ENABLE
script.Parent.MouseButton1Up:Connect(function()
if script.Parent.Parent.Parent.Parent.Title.Enabled == false then
script.Parent.Parent.Parent.Parent.Title.Enabled = true
end
end)
god, so many replies for nothing. there you go (ur starter gui in the image u sent doesnt look like its matching to the script so that may be why
local player = game:GetService("Players").LocalPlayer
local PlayerGui = player.PlayerGui
script.Parent.MouseButton1Click:Connect(function()
if script.Parent.Visible == true then
script.Parent.Visible = false
end
if PlayerGui:WaitForChild("AnimationsGui").Enabled == false then
PlayerGui:WaitForChild("AnimationsGui").Enabled = true
end
end)