Player model worldpivot not updating correctly


The brown thing is coded to move toward the player’s position on the z axis clamped to -31 and -71 as shown here:



script.Parent.Event:Connect(function(Character)
	for i = 1 , 120 do
		print(math.clamp(Character.WorldPivot.Position.Z , -71.5 , -31.5))
		game.TweenService:Create(script.Parent.Parent , TweenInfo.new(0.1) , {CFrame = CFrame.new(107 , 0.7 , math.clamp(Character.WorldPivot.Position.Z , -71.5 , -31.5))}):Play()
		wait(0.1)
	end
end)

When the event is triggered the part just moves to the upper limit and stays there despite my character’s worldpivot.Position being lower.

This may be due to the new Pivot update, but I am assuming and not 100% sure this may be. Pivots were basically Revamped, you might have the new beta option already enabled.

What does that update do and how do i work around it / disable it?

There was a recent post on the devforum which I cant seem to find, you can search “Pivot” and see if that helps.

Is it this one? I don’t understand how this could affect the script?

Have you set the WorldPivot point of your player? It looks like your Offset is set to 0,0,0 so if your Head (PrimaryPart) is the Pivot of your player it’ll be off center for the WorldPivot.Position of the player by a couple studs.

Why not just use the sphere’s Position as their location?

Because it was easier that way, the 2 studs in difference don’t really affect me, the problem is that the position the part goes to Z = -31 and does not move afterward, if i print out Character.WorldPivot.Position it always gives a seemingly random value of 16.
Also i’m pretty sure that the pivot is located at the center of the model itself instead of the PrimaryPart

But yeah using the primary parts position did work lol.