Hello, I am currently making a system where you can click a piece of paper and a GUI appears on your screen. A button next to it also appears to exit.
That works fine. However, once you click the button to exit, and when you click on the paper again, you can’t open it back up. I’ve tried everything I could think of and it’s probably a simple fix.
Code (server script inside GUI):
local Note = game.Workspace.Note
local ClickDetector = Note.ClickDetector
ClickDetector.MouseClick:Connect(function()
script.Parent.TextLabel.Visible = true
script.Parent.ClosePaper.Visible = true
script.Parent.CloseSound:Play()
end)
Code in Local Script:
local button = script.Parent
button.MouseButton1Click:Connect(function()
script.Parent.Parent.TextLabel.Visible = false
script.Parent.Parent.ClosePaper.Visible = false
script.Parent.Parent.PaperPickUp:Play()
end)
Hierarchy:
If you think you know what went wrong, please let me know. Have a wonderful day!