Proximity prompt doesn’t trigger twice. Once a proximity prompt in the game is triggered, every other proximity prompt in the game will not trigger at all.
The following is part of a Script
script.Parent.ProximityPrompt.Triggered:Connect(function(plr)
print("triggered")
plr.Character.HumanoidRootPart.Position = workspace.SpawnPoints.PracticeObbyTP.Position
end)
The proximity prompt and the script is a child of the same part. The part is a child of workspace. The proximity prompt has its default properties.
I tested this in game to see if its just a studio problem… the problem still occured.
What could be wrong?
Are multiple ProximityPrompt
s named “ProximityPrompt” in the workspace or am I just not getting it?
There are multiple proximity prompts in the game.
DevTKL
(DeveloperTKL)
July 7, 2024, 5:09pm
#4
script put in PoximityPompt
script.Parent.TriggerEnded:Connect(function(player)
local part = workspace.SpawnPoints.PracticeObbyTP.Position
if player and player.Character then
player.Character:MoveTo(part.Position) end end)
1 Like
@Rescriptedd is right. We should probably check the output to see if it prints triggered
.
It only prints triggered once. (when the first prompt is triggered). but when we try to trigger it again it won’t print ‘triggered.’
But the code you provided above worked after some tweaks. Thanks
I guess I had to use TriggerEnded than Triggered.
Rescriptedd
(9gzfaUa1DeGxYkqgZxIJ)
July 7, 2024, 5:13pm
#10
ProximityPrompt.Triggered
seems to work for me completely fine.
1 Like
I don’t know why it didn’t work for me lol
I’ve tried it several times.
Anyways, thank you for your help
system
(system)
Closed
July 21, 2024, 5:15pm
#12
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.