So here's what I tried to do:
Making a PrimaryPart
and doing this:
while true do script.Parent.PrimaryPart.Position = script.Parent.PrimaryPart.Position - Vector3.new(0,0,1) wait(0.5) end
Use :SetPrimaryPartCFrame() wich moves the model ignoring collisions, or use :MoveTo() method to move it withOUT ignoring collisions, wich means if it collides it will search for a free space to use, here is an example with :SetPrimaryPartCFrame method
local model = workspace.YourModel local positionGoal = Vector3.new() -- must be a vector3, it can be the position of another part -- if the model has a primary part then model:SetPrimaryPartCFrame(CFrame.new(positionGoal)) -- moves with a converted cframe --[[ Something you need to know, SetPrimaryPartCFrame can rotate the model, with CFrame.Angles , etc ]]
With :MoveTo Method
local model = workspace.YourModel local positionGoal = Vector3.new() -- must be a vector3, it can be the position of another part -- if the model has a primary part then model:MoveTo(positionGoal) -- needs Vector3, --[[ Something you need to know, MoveTo method doesn't rotate the part, but it doesnt ignore collisions ]]
So what are you trying to do is
while wait(0.5) do -- you can do this too instead of while true script.Parent:SetPrimaryPartCFrame(CFrame.new(script.Parent.PrimaryPart.Position - Vector3.new(0,0,1)) end
You dont use PrimaryPart, because that only moves the part, it only moves the entire model if not anchored and it must be welded, thats because SetPrimaryPartCFrame and MoveTo exist
If this helped you, please mark this as answered!
https://developer.roblox.com/en-us/api-reference/function/Model/SetPrimaryPartCFrame should tell you most of the info about it
aka you have to use a function
So you also need to make sure that the parts within the model are welded to eachother, otherwise, it'll only move the PrimaryPart.
local part = script.Parent.PrimaryPart while wait(0.5) do --you can also have the loop with a wait like this part.CFrame=part.CFrame:Lerp(CFrame.new(Vector3.new(0,0,1),Vector3.new())) end
You will want to use CFrame:Lerp() to move a CFrame from one point to another smoothly.
If this answers your question, then mark it as the accepted answer.
Models should have a MoveTo function -- Lookup models on the wiki for more info
So to do this, a efficient process without using SetPrimaryPartCFrame with floating point accuracy errors, you would have a part that will be your model’s root, with all parts welded to that root part, make sure the weld method is using WeldConstraints. Make sure every part in your model is unanchored, but leave the root anchored, then to tween, you would apply TweenService:Create onto the root part.
Here’s a dev forum thread regarding the question: https://devforum.roblox.com/t/introduction-to-tweening-models/315253