Proximity Prompt firing once?

local ProximityPrompt = script.Parent

ProximityPrompt.Triggered:Connect(function(player)
	player.PlayerGui.Shop.Frame.Visible = true
end)

this works one time after that one time it never works again, I tried a while true do loop but that didnt work either, why does this not work after one time?

image

What kind of script are you using? Remember that Scripts represent the server and LocalScripts represent the client. If there’s a LocalScript that sets the shop frame’s visibility to false but a Script that sets it true, the client’s visibility set will not replicate to the server. The server would not ever see the frame’s visibility become false so it’d just be attempting to set the same visibility, hence no change.

If it’s a LocalScript handling this, then you should confirm that the prompt script and the Gui handler are both setting the same thing visible.

3 Likes

Seems like a one off issue I deleted the prompt and put in a new one and now its working fine