Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

difference between these two methods?

local part = game.Workspace:FindFirstChild("Spawn")
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(chr)
		local hrp = chr:FindFirstChild("HumanoidRootPart")
		hrp:PivotTo(part.CFrame)
	end)
end)

here's the code the method is being used on

hrp:PivotTo(part.CFrame)
chr:PivotTo(part.CFrame)

my question is what's the difference between these two? which one's better to use? they both do the same thing in my testing

1 answer

✓ Accepted answer

I don't think there's a difference. If you're teleporting a player, an npc, or a model, you definitely use Model:PivotTo(). But if you're teleporting a specific part, you use Part:PivotTo().

1 comment

0

alr preciate u bro

This discussion is preserved as it was. New answers, comments, and votes are closed.