Prompt.Triggered event doesn't fire, what is the issue?

Hey there. It’s my first time posting here on DevForum, so I’m sorry for any mistakes I make.

My issue is happening after I programmed my game’s menu with Camera Manipulation, and then ProximityPrompts just didn’t work anymore.

I tried running this simple code:

script.Parent.Triggered:Connect(function()
    print("hi")
end)

And there was no output after I tried using the prompt many times. But when I ran the same code on the Command Bar it actually printed: "hi". What could be happening?

( I read this similiar topic here, and It didn’t solve my problem. )

2 Likes

Any chance it’s a localscript?

Your code looks fine, could you send a picture of your hierarchy? There might be something set up incorrectly.

I think the problem could also be that proximity prompts are based on the position of the character, but in your case you might have done something so that the code can’t get the character or it’s position.

Somethings to check:

  • Haven’t affected Camera.CameraSubject?
  • Haven’t affected Player.Character?

Edit:
Never mind, that’s probably not the problem since the prompts show up.

The code that is used for the Triggered event is a Server Script.

Not sure if i understanded what your issue was all i understanded from your forum is that the triggered event didnt fire? but is this what you were looking for?

Also the code used :+1:

local ProximityPrompt = script.Parent.ProximityPrompt
ProximityPrompt.Triggered:Connect(function(plr)
print(plr.Name.." Has trigged the "..ProximityPrompt.Name)
end)
1 Like

If i didn’t help you im deeply sorry :slightly_frowning_face:

Sadly, it didn’t work. The event isn’t firing at all! :sad:

Its firing in the video that was provided so im not sure if its just on your end :thinking:

Can you show us the script in your Explorer?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.