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. )
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.
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
local ProximityPrompt = script.Parent.ProximityPrompt
ProximityPrompt.Triggered:Connect(function(plr)
print(plr.Name.." Has trigged the "..ProximityPrompt.Name)
end)