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)

2 comments
Sorry im new to this, could you post the code, because now im getting errors that position is not a valid member of players.administrativefellow @Vong25
You have to use the Character property of the player to get the player. Then, path to the HumanoidRootPart and set its position.