Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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)

2 comments

0

Instead of PromptButtonHoldEnded you should add Triggered then connect it to a function.

0

Thank you

1 answer

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

This discussion is preserved as it was. New answers, comments, and votes are closed.