here's my code for a gui pad (when you step on it a gui pops up,)

i can't make it so it disappears when you step off of it, got any idea's?

here's the code

--made by Pr_ogram local debounce = false

function getPlayer(humanoid)

local players = game.Players:children()

for i = 1, #players do

if players[i].Character.Humanoid == humanoid then return players[i] end

end

return nil

end

function onTouch(part)

local human = part.Parent:findFirstChild("Humanoid")

if (human ~= nil) and debounce == false then

debounce = true

local player = getPlayer(human)

if (player == nil) then return end

user = game.Players:findFirstChild(human.Parent.Name)

script.Parent.Gui:clone().Parent = player.PlayerGui

wait(2)

else

wait(2)

debounce = false

end

end

script.Parent.Touched:connect(onTouch)

thanks!

1 comment

0

I can tell this is not your script. Adding a comment "made by Pr_ogram" doesn’t make it yours. I saw this exact script last month.