HumanoidRootPart CFrame not changing on character spawn? Try this!

Despite your best efforts to use SetPrimaryPartCFrame, does your character keep spawning from the sky in an empty baseplate?

Then transform your code:

game.Players.PlayerAdded:Connect(player)
	local character = player.Character or player.CharacterAdded:Wait()
	character:SetPrimaryPartCFrame(cframe)
end)
game.Players.PlayerAdded:Connect(player)
	player:LoadCharacter()
	local character = player.Character
	character:SetPrimaryPartCFrame(cframe)
end)

Interesting hack.


Insight gathered from the link below:


This post is in response to @anthlons’s of a similar name.

That’s better.

This one is a massive pain, SetPrimaryPartCFrame is deprecated and this one makes the network usage higher, just use :PivotTo() instead

1 Like

The SetPrimaryPartCFrame is called by the server and is only done once per joined player. Are there other un-intended side effects?

it’s pretty much it from what I’ve used earlier if you have to use this to tween all the NPCs or some objects, SetPrimaryPartCFrame was probably calculating them in a serial way + they were uncached back when PVInstance weren’t introduced which is quite unhealthy.

1 Like

PlayerJoined?

(Unoffical API, that shows hidden members as well.)

1 Like

Fixed.

1 Like

couldnt you just use a spawnpoint?
also how does bro have internal roblox player (tell us the method)