ProximityPrompt Teleportation not working as intended?
Hey, I'm trying to make a set of stairs that teleport to eachother when you use them. When I first put a script in, it worked, but you could hold you any amount of time and it worked. I had been requested by another developer to make sure it is after the delay, so I changed it a little, but nothing happened no matter how long you hold.
01 | local prox = game:GetService( "ProximityPromptService" ) |
03 | local function onPromptTriggered(promptObject, player) |
04 | if promptObject = = script.Parent then |
05 | local chr = player.Character |
07 | local humroot = chr:FindFirstChild( "HumanoidRootPart" ) |
09 | humroot.Position = Vector 3. new( 313.25 , - 580.087 , - 267.5 ) |
15 | prox.PromptTriggered:Connect(onPromptTriggered) |
The method that worked but not as expected utilized PromptButtonHoldEnded()
.
Any way anyone can help this?