Welp, you can't really ask for requests here but sure i'll show you, this doesn't use any scripting knowledge, it's just a smart setup only using variables. Now obviously your gui is gonna have a button, either a text button or an image button, im not sure how you set it up so you may wanna do some changes in your script, we are going to use a local script since all ui objects are local,
local frame = script.Parent.Parent
local button = script.Parent
local open = false
button.MouseButton1Click:Connect(function()
if open == false then
open = true
frame.Visible = true
else
open = false
frame.Visible = false
end
end)
and that's really it, the Visible propety isprety much self explainbale, if its false local player wont see the ui, if its true he does.
I notice that you have no knowledge of scripting, and that's relly bad to just always ask others to make them stuff, start learning!
7 comments
you can not just use frame.Visible = not frame.Visible ? and you can only use button.Actived
what? did i do anything wrong
No, but it would be much simpler to use this, using this you dont need variable. if you want to make this only change the open/close to frame.Visible = not frame.Visible and on button.MouseButton1Click change to button.Actived (you dont need to use this, only if you like)
yah button.Activated is a thing, but idk 99% people use the MouseButton1Click event
oh ok, you might be right, i use this since i started scripting, ty for telling me!
button.Actived does the same thing literally
yahyah ik now