I have problem with that script:
script.Parent.MouseButton1Click:connect(function()
script.Parent.Parent.Frame.Visible = false
end)
I have been able to make it disappear, but now I need it to reappear without the player restarting.
I have problem with that script:
script.Parent.MouseButton1Click:connect(function()
script.Parent.Parent.Frame.Visible = false
end)
I have been able to make it disappear, but now I need it to reappear without the player restarting.
Hey, Bryan! Great question!
You can do this by using a debounce or a more simpler way:
local Frame = script.Parent.Parent.Frame
script.Parent.MouseButton1Click:Connect(function()
if Frame.Visible == true then --So if the value is true then it runs the code below!
--Code here
elseif Frame.Visible == false then --However, if the frame is not visible then it runs this code instead! Pretty simple!
--Code here
end
end)
You can also do this by using a debounce, which you can learn about here: https://developer.roblox.com/en-us/articles/Debounce
Be sure to upvote and mark as solution is it helps you! Happy scripting
This discussion is preserved as it was. New answers, comments, and votes are closed.