How do I make a more advanced script of this:
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Gui.Visible = not script.Parent.Gui.Visible
end)
How do I make a more advanced script of this:
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Gui.Visible = not script.Parent.Gui.Visible
end)
I suggest to use TweenService, with that you can do more advanced Gui and more, you can find a lot of tutorials about on YouTube
Here is one
I mean like if I used this script, It could be spammed clicked and it would not work well if I associated an other script to it.
You can add a Debounce to solve the spam issue
You could add a debounce, which is essentially a cool down. Before running the code check if the cool down is done.
local debounce = false
script.Parent.MouseButton1Click:Connect(function()
if debounce == false then
debounce = true
script.Parent.Gui.Visible = not script.Parent.Gui.Visible
wait(0.3)
debounce = false
end
end)