Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Gui Enables Once but does not reappear?

Asked by 4 years ago
Edited 4 years ago

It enables another gui that has a close button which just makes the gui disabled it works the first time but after the gui is closed and I retouch the part it does not reappear

Script for the part that is being touched

local debounce = false

script.Parent.Touched:connect(function(hit)
    wait (.5)
    local human = hit.Parent:findFirstChild("Humanoid")
    if (human ~= nil) and debounce == false then
        debounce = true
        local plr = workspace[hit.Parent.Name] 
            local player1 = game.Players:GetPlayerFromCharacter(plr) 
        local gui = player1.PlayerGui.DoorHackGui
        gui.Enabled = true
        print("Touched")
    else
    if debounce == true then delay(5,function()end)
        debounce = false
        end
    end
end)

I have no Idea what is the problem please any suggestions would help

Function that is closing the gui nothing else is changing the gui in anyway visibilty or anything

function puzzleend()
    script.Parent.Enabled = false
    print ("finished")
end
0
Can I see your close button script too. Block_manvn 395 — 4y
0
posted krispykreme90 15 — 4y
0
maybe its because ur script maybe gets disabled? HappyTimIsHim 652 — 4y

Answer this question