Roblox Proximy Promt

Hi! I need help with this, when I triggered ProximyPromt the first time then the second time nothing happened. I tried searching on Roblox DevForum but I didn’t find anything.

script.Parent.Triggered:Connect(function(player)
    player.PlayerGui.Research.Enabled = true
end)
1 Like

Well, you’re only enabling it once and that’s it. You should use a debounce:

local debounce = false

script.Parent.Triggered:Connect(function(player)
    if player.PlayerGui.Research.Enabled ~= true then
        debounce = true
        player.PlayerGui.Research.Enabled = true
        wait()
        player.PlayerGui.Research.Enabled = false
        debounce = false
    end
end)

EDIT: I changed it to where it will change if it is enabled when the debounce = false

1 Like

There will be no difference if you used it multiple times…
It does fire multiple times tho, you can check by adding a print

1 Like

That’s why he should use my script

1 Like

It still wont make any difference firing it multiple times wont make any change it will run the same way, your code just checks if its enabled or not…

1 Like

Try this

script.Parent.Triggered:Connect(function(player)
    print('Triggered')
    player.PlayerGui.Research.Enabled = not player.PlayerGui.Research.Enabled
end)

1 Like

Today I realized The Script will turn on GUI and LOCALSCRIPT will close. After I close GUI from LOCALSCIPRT I dont see it on but Server still thinks I see GUI. I need use RemoteEvent.

1 Like