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

Why my gui is not activated when I interact with the part?

Asked by 2 years ago

I made a script of when you interact with a part through a proximityprompt a gui is activated, and there is a button that deactivates the gui, but for some reason when I interact with the part and close the gui I can't activate it anymore through interaction

Script inside part

 script.Parent.ProximityPrompt.PromptButtonHoldEnded:Connect(function(plr)
    plr.PlayerGui.ArmarioGui.Enabled = true
 end)

LocalScript inside a textbutton

local Players = game:GetService('Players')

script.Parent.Activated:Connect(function()
    local jogador = Players.LocalPlayer
    jogador.PlayerGui.ArmarioGui.Enabled = false
end)

0
Instead of PromptButtonHoldEnded you should add Triggered then connect it to a function. BoiBoi24T 63 — 2y
0
Thank you Pro_Pedro555 0 — 2y

1 answer

Log in to vote
0
Answered by
enes223 327 Moderation Voter
2 years ago

hey you! have you ever heard of enes? if you are in trouble, better call enes!

Ad

Answer this question