local TeleportService = game:GetService("TeleportService")
local elevatorpos = script.Parent.Elevator.Union.Attachment.Position
local function yield()
for i=15, 0, -1 do
end
end
local function tp(otherpart)
if not otherpart.Parent:FindFirstChild("Humanoid") then return end
otherpart.Parent.HumanoidRootPart.CFrame = CFrame.new(elevatorpos)
print(elevatorpos, "attachment")
print(otherpart.Parent.HumanoidRootPart.Position)
end
script.Parent.Hitbox.Union.Touched:Connect(tp)
For some reason the player keeps getting teleported to what seems to be the origin (0,0,0) Even though when I print the position it should be correct. This is all from a serverscript inside a model inside workspace

1 comment
Instead of moving their humanoid rootpart get their character and use :MoveTo()