Making a model move

I’m trying to make a cloned model move forward. Here is what I have which I thought would work but isn’t working and isn’t giving me any errors.

local CarFolder = game.ReplicatedStorage.Cars

local items = CarFolder:GetChildren()
local randomItem = items[math.random(1, #items)]
local item = randomItem:Clone()
item.Parent = game.Workspace
item:SetPrimaryPartCFrame(script.Parent.CFrame)

local function Move()
		while true do
			item:SetPrimaryPartCFrame(item:GetPrimaryPartCFrame() * CFrame.new(0,0,-1))
			wait()
		end
	end

while true do
	wait(1)
	Move()
end

What’s supposed to be happening is a model will be cloned and then moved into workspace and then will be teleported. Right after the model is teleported its supposed to move. The model gets cloned and then teleported but the problem is it just stays in place and doesn’t move. Thanks.

Have you looked into Model:MoveTo?

Model:MoveTo (roblox.com)

1 Like

You could also Tween the part using TweenService.

https://developer.roblox.com/en-us/api-reference/class/TweenService

1 Like