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

ProximityPrompt not working. Do they not work with GUIs? [ANSWERED]

Hello, first of all i would like to thank to spend your valuable time to answer my question.

I am working on a game and i wanted to open up a GUI using proximityPrompts. I am a BIG NOOB so dont judge me if this is a silly question.Anyways,

ButtonHolder is a part in workspace containing a ProximityPrompt which is the parent of my LocalScript.RolesGUI is a ScreenGUI which contains a Frame called RolesUI. I want the frame to appear when I trigger the ProximityPrompt

local Button = game.Workspace.ButtonHolder.ProximityPrompt
local PromptService = game.GetService("ProximityPromptService")

script.Parent.Triggered:Connect(function()
	print("yes")
	local RolesUI = game.StarterGui.RolesGUI.RolesUI
	RolesUI.Active = not RolesUI.Active
	RolesUI.Visible = not RolesUI.Visible
end)

Thanks for spending your valuable time! I really appreciate it.

3 comments

0

the print statement doesnt even show up. HELPPPP

0

if that is from a local script, it wont run because its in workspace. instead, put it in starter player scripts and do button.triggered instead of script.parent.triggered. i don't know if proximity prompt works locally. if it doesnt work you can use a remote instead. also when changing ui do in player gui instead of starter gui.

0

ummm sorry for late response but thanks a lot to u

1 answer

So I happened to figure ta solution out myself. Posting this for any person in future facing similar issues. I just substituted the Frame.Active for ScreenGui.Enabled and it happened to work.

Just a simple way around, hope it helps.

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