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)

1 comment
It doesn't work yet