I was experimenting that I want that when a player touch a part, The gui shows and it's shows again when a player touchs the part again. But the script that i have it's only close the gui and it's doesn't open anymore. "It's a teleportation Gui but i want that the gui shows repeatedly"
This is the script:
local Part = script.Parent
local Debounce = false
Part.Touched:Connect(function(hit)
if Debounce == false then
Debounce = true
if hit.Parent:FindFirstChild("Humanoid") then
local plr = game.Players:GetPlayerFromCharacter(hit.Parent).PlayerGui
script.ScreenGui:Clone().Parent = plr -- replace "ScreenGui" with the name of your ScreenGui
end
wait(1)
Debounce = false
end
end)
Close teleport gui script:
script.Parent.MouseButton1Click:Connect(function()
script.Parent.Parent.Visible = false
end)

9 comments
Can u give us the other script that is in the part
What do you mean?
Don't u have 2 scripts one in the part and one in the gui
Yes
Can u show them in your post?? It would make it easier to help you if we understand all the scripts.
Ok
Can you update your post showing the other script
Ok
Updated! Sorry for the long wait, I was so busy on my journey in my pc lol