ProximityPrompts are not Exicuting any code aside from print()

  1. Introduction
  • Hi I am trying to work with ProximityPrompt’s… but they don’t exicute code
  1. What is the issue?
  • So the ProximityPrompt does not exicute code only print() functions…
  • And because it could only print I thought Roblox was broken because of the storm we had…
  • But the code can run on runtime outside of the ProximityPrompt function so the code does work…
    and the ProximityPrompt also works because it prints when I press it… but it just doesn’t run the code…
  1. What solutions have you tried so far?
  • I tried all sorts of stuff, I watched so many videos and looked at so many forum posts but it doesn’t give me the answer of making that damn thing run code…
  • I have tried many versions to run the ProximityPrompt functions and they all work… but don’t exicute code…
local ConfirmationFrame = game.StarterGui.Screen:WaitForChild("EditDummie")
--ConfirmationFrame.Visible = not ConfirmationFrame.Visible

script.Parent.Triggered:Connect(function(plr)
	print("Hello")
	ConfirmationFrame.Visible = not ConfirmationFrame.Visible
	print("World")
end)
  • I tried it on a door and I thought TweenService was just a broken piece of garbage, and a lot of other little projects… this Proximity thing just doesn’t work

Make sure you are referencing PlayerGui instead of StarterGui. Everything in StarterGui gets copied into each player that joins the game, so changes made in StarterGui after a player has joined the game won’t appear.

1 Like

This literally does not work, if you want to modify a player’s gui then use plr.PlayerGui instead.

Here’s the solution:

script.Parent.Triggered:Connect(function(plr)
    local ConfirmationFrame = plr.PlayerGui.Screen:WaitForChild("EditDummie")
	print("Hello")
	ConfirmationFrame.Visible = not ConfirmationFrame.Visible
	print("World")
end)
1 Like

I get it now thank you!

  • so TweenService is just broken I began to think it was ProximityPrompt being broken