So I know that title makes no sense so let me explain, I had a question already answered by user (DragonSpawner12). There's one more thing though, he/she showed me how to make my gui go off the screen after a certain amount of time, but you can keep clicking it over and over and it breaks it to where it just stays on screen. I also want it where you can only click it once. Here's the script. (I also had to repost this because no one answered my last one).
function onClick(click)
for i,v in pairs (script.Parent:GetChildren()) do
if v.ClassName == "ScreenGui" then
c = v:Clone()
c.Parent = click.PlayerGui
wait(3)
c:Destroy()
end
end
end
script.Parent.ClickDetector.MouseClick:connect(onClick)

1 comment
I don't know how make the code right so, I'm sorry for that