So I’m trying to teleport a player to a part but his teleport position always goes 0,0,0 for no reason, here’s the position of the part that I’m trying to teleport the player to: 103.98, 1.025, 5950.197
Here’s the script that I’m using:
Code
print(plrCharacter.PrimaryPart.Position) -- The player's primarypart position before the teleportation
print("===================================")
plrCharacter.PrimaryPart.Position = Vector3.new(workspace:FindFirstChild("StartPart",false).Position)
print(plrCharacter.PrimaryPart.Position) -- The player's primarypart position after the teleportation
But I still currently have no idea why it isn’t working when I reference the part and then get the part’s position instead of pasting the position directly so for people who are coming in the future who are having the same issue you just have to get the part’s position directly and then past it in like I did.
Your method worked but mine works too, I heard that :SetPrimaryPartCFrame() has issues within it so I will just use my solution that I came up with because it’s probably better but thanks for trying to help anyways.
What issues, can I get a link? Describe the issues, I always use SetPrimaryPartCFrame, it works like magic, all it needs is a PrimaryPart, also using MoveTo can be useful
SetPrimaryPartCFrame is only bad if you’re using it against a fully anchored model. If you have a model that’s completely unanchored or has at least one anchored part and every other part is connected together through welds, the inaccuracies issue does not occur.
I still hate SetPrimaryPartCFrame in any case and will avoid it like the plague. I prefer to directly set the HumanoidRootPart’s CFrame if I need to send the character somewhere.