Object not showing up at right place

Hi. My problem is that I’m trying to move an object (a part) to the center of another object. It runs without a bug but the object appears at 0,1.5,0 instead of the place I want it to go too.

	if PowerUp == 1 then -- Hot Cocao
		PU = HC:clone()
		PU.Parent = script.Parent
		PU.Position = Vector3.new(script.Parent.Bottom.CenterOfMass.X, script.Parent.Bottom.CenterOfMass.y + 2, script.Parent.Bottom.CenterOfMass.Z)
	elseif PowerUp == 2 then -- Sheild
		PU = GCL:clone()
		PU.Parent = script.Parent
		PU.Position = Vector3.new(script.Parent.Bottom.CenterOfMass.X, script.Parent.Bottom.CenterOfMass.y + 2, script.Parent.Bottom.CenterOfMass.Z)
	elseif PowerUp == 3 then -- iceball
		PU = IB:clone()
		PU.Parent = script.Parent
		PU.Position = Vector3.new(script.Parent.Bottom.CenterOfMass.X, script.Parent.Bottom.CenterOfMass.y + 2, script.Parent.Bottom.CenterOfMass.Z)
	elseif PowerUp == 4 then -- SlushBall
		PU = SB:clone()
		PU.Parent = script.Parent
		PU.Position = Vector3.new(script.Parent.Bottom.CenterOfMass.X, script.Parent.Bottom.CenterOfMass.y + 2, script.Parent.Bottom.CenterOfMass.Z)
	end
	GenPowerUP = 0
1 Like

https://developer.roblox.com/en-us/api-reference/property/BasePart/CenterOfMass
“CenterOfMass is not currently enabled”
Just use position here, it shouldn’t matter anyways unless you’re using unions or something for it

Using unions for the base. I decided to use them

Fixed it. Swapped to AssemblyCenterOfMass!

1 Like