How would I teleport a model?

So I am trying to teleport the roblox car model that roblox made a while back. basically what I want to happen is when the player drives into a part, I want the car to be teleport to a different spot, this is te code I have right now:

script.Parent.Touched:Connect(function(model)
	if model.Parent.Parent.PrimaryPart.Name == "FloorPanel" then
		local modelprim = model.Parent.Parent.PrimaryPart
		modelprim.CFrame:MoveTo(script.Parent.garageval.Value.one.Position)
	end
end)

It doesn’t really work and throws back an error:

MoveTo is not a valid member of CFrame

I have the primary part set.

You will need to reference the model in order to use :MoveTo.

script.Parent.Touched:Connect(function(partHit)
	if partHit.Parent.Parent.PrimaryPart.Name == "FloorPanel" then
local model = partHit.Parent.Parent
		model :MoveTo(script.Parent.garageval.Value.one.Position)
	end
end)
1 Like

glad my problems are easy to fix, thanks mate