Script:
local Menu = script.Parent.Parent.Menu.ScreenGui.MainFrame
function Equipped()
script.Parent.Parent.Menu.ScreenGui.MainFrame:Clone()
script.Parent.MainFrame.Parent.Equipped()
if onEquipped()
MainFrame.Parent.Parent = script.Parent.Parent.Menu.ScreenGui.MainFrame:Clone()
MainFrame.Parent = player.PlayerGui
end
end
function
MainFrame:Remove()
end
Tool.Parent.Parent.Menu.ScreenGui.MainFrame:Connect(onEquipped)
Tool.Parent.Parent.Menu.ScreenGui.MainFrame:Connect(onUnEquipped)
I noticed that this is my first time scripting, but I am trying to make a like a screen gui open a Frame which shows the image. (I think its called Frame open it Or something like that.)
And I noticed I script it very wrong. (I am kinda learning to script.)
I also somehow have a red underline error between MainFrame
Here is a picture for it.
Picture:
https://gyazo.com/e5fc7ed2fb99cf7a4eaa07d8155b8cf4
For the onEquipped() I made the GUI like when the tool is Equipped It shows the GUI frame. when it's on Or Equipped.
And the part here said onUnEquipped, This means that when the Gui is Equipped but then the player decided to UnEquipped Somehow the GUI Remove itself from the screen or I should say its gone or disappear.
So I really know that I kinda got it wrong but thank you for helping me. Also, this is my first scripting and it took me some time. I am still learning to script so thank you.
Also, please tell me the things I got wrong, so in the future, I don't get it wrong again.

2 comments
dude.... just make the shop invisible then if you clicked the open thingy make it visible and change the text to close, another way is put the GUI in lighting then clone it out when a player click on that open button
Umm..I am not a dude I am a girl. And that was kinda rude so umm..and your not helping at all.