What do you want to achieve? Keep it simple and clear!
A proximity prompt that make a gui visible
What is the issue? Include screenshots / videos if possible!
It keeps giving me errors for line 4 of my script, it looks fine to me.
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
local UI = script.Parent.MainFrame
local DB = false
local CloseB = UI.Close.CloseButton
local proximity = game.Workspace.FridgeUiTrigger.ProximityPrompt
proximity.Triggered:Connect(function()
print("test1")
if not DB then
print("test2")
DB = true
UI.Visible = true
end
end)
CloseB.MouseButton1Click:Connect(function()
print("test3")
if DB then
print("test4")
UI.Visible = false
DB = false
end
end)
Input is not detected from a ProximityPrompt in a localscript. It wonât return errors, the script just wonât pick up on any events fired by a ProximityPrompt
Thanks! So the error is telling us that either the promptâs parent doesnât exist or the script is trying to find it in the wrong spot. You will need to verify that the script pointer (line 4) is pointing exactly to where the promptâs parent is found in the Explorer tab
In short, you placed it either inside a folder, or itâs in another directory! (ex. ServerScriptService)
Make sure you drag the UI trigger into the workspace, or rescript it so it directs to the correct path.
You can look up FridgeUiTrigger in the explorer, and send a screenshot of it.