1 | Workspace.BG.Lolol.Touched:connect( function (hit) |
2 | script.Parent.Visible = true |
4 | script.Parent.Visible = false |
Your current script has many problems, and, we need more information.
Assuming from what you have as of now, you have either a BillboardGUI or SurfaceGUI.
To start off, I suggest using a capital c because a lower case is deprecated
1 | Workspace.BG.Lolol.Touched:Connect( function (hit) |
2 | script.Parent.Visible = true |
4 | script.Parent.Visible = false |
now, we don't know what script this is, so, let's say "add a local script" (Local scripts work best when dealing with GUI)
There is no point of having "hit" since your not going to use it. Now I can help improve your code, but can not help you solve your problem. This is because information was lacking.
You can add a debounce so spam doesn't happen:
03 | Workspace.BG.Lolol.Touched:Connect( function (hit) |
06 | script.Parent.Visible = true |
08 | script.Parent.Visible = false |
I can only help you to what I know and what should be done. I wish you luck on your goal.