So I have a proximity prompt on both sides of the door that teleport me on the other side after using the proximity prompt.
It works completely fine with no errors for about 5-8 times before it just stops working.
No errors or anything, the circle goes around the E completely but nothing happens. I have no idea why it stops working after a certain amount of uses.
local Tpin = script.Parent.TpInsideRoom local Tpout = script.Parent.TpOutsideRoom game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) print("1") local humanoid = character.HumanoidRootPart print("2") script.Parent.inknob.ProximityPrompt.Triggered:Connect(function(player) print("3") humanoid.Position = Tpout.Position print("4") end) end) end) game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) print("5") local humanoid = character.HumanoidRootPart print("6") script.Parent.out.ProximityPrompt.Triggered:Connect(function(player) print("7") humanoid.Position = Tpin.Position print("8") end) end) end)
You should not have the Triggered
events inside the PlayerAdded
and CharacterAdded
events. You can use the player parameter from the Triggered
event to teleport the player.