I’m creating a pointer system to move models, but I’m having trouble with the CFrame.
-
What do you want to achieve?
This is the result I expect
-
What is the issue? Include screenshots / videos if possible!
In practice
-
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