Moving a model using a base origin

I’m creating a pointer system to move models, but I’m having trouble with the CFrame.

  1. What do you want to achieve?
    This is the result I expect

  2. What is the issue? Include screenshots / videos if possible!
    In practice
    scriptidk

  3. What solutions have you tried so far?
    I have searched the documentation on how to manipulate the coordinates, but I can’t understand how it really works.
    Vector3 | Documentación del Centro de creación de Roblox
    CFrame | Documentación del Centro de creación de Roblox

After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

So far this is the third version that moves the models, but in each one it moves differently (some go 1 kilometer off the map)

local function MovePointers(SelfModule)
	local Children = workspace.Tycoon:GetChildren()
	local TargetDropper = workspace["Model Templates"].Dropper
			
	for _, p in ipairs(Children) do
		if p:GetAttribute("IsPointer") == true then
			local CloneDropper = TargetDropper:Clone()
			CloneDropper.Parent = workspace
					
			local OriginPivot = CloneDropper.Origin:GetPivot()
			local OffsetPivot = CloneDropper:GetPivot()
					
			-- print(OriginPivot.X, OriginPivot.Y, OriginPivot.Z)
			-- print(OffsetPivot.X, OffsetPivot.Y, OffsetPivot.Z)
					
			local RealPivot = CFrame.new(OriginPivot.Position + OffsetPivot.Position)
			CloneDropper:PivotTo(RealPivot)
		end
	end
end

use Model:MoveTo() to move the entire model to the position

@AMisspelledUsernaem
ty

You usually want to stay away from MoveTo as it will not move to the exact position if it’s colliding with something. However PivotTo will set it’s CFrame directly.

What happens if you use MoveTo on the same position for both models
image

1 Like

I tried and don’t work

1 Like

actually you should use it on the model named test for the whole model to move, but like @AMisspelledUsernaem said pivotto seems to be a good option

I know, i forgot to send also the other option

o thats right it moves directly to the given position, i think what you needs is tween

Make sure you set the pivot of the model

this is the first thing i tried

@SummerTYT
put the test model inside the origin
weld part:
part0 to testpart
part1 to origin

next use PivotTo(point part cframe)

1 Like


it works!!!

1 Like

You didn’t set the PivotProperty of the model itself

I’ve never seen that, that’s new to me

1 Like