What am I doing wrong here? The commented line is what I was trying to do as it would move the whole model. However, I get an error that says "Unable to cast double to CoordinateFrame"
What this is supposed to do is if the y position is greater then 20 then it will bring the model down to a y of 10
local PrimaryPart = script.Parent.PrimaryPart
local Model = script.Parent
while true do
wait()
if PrimaryPart.Position.Y > 20 then
PrimaryPart.Position = Vector3.new(PrimaryPart.Position.X, 10, PrimaryPart.Position.Z) -- Doesn't move the whole model
--Model:SetPrimaryPartCFrame(PrimaryPart.Position.X, 10, PrimaryPart.Position.Z)
end
end

3 comments
Well the problem with doing model:SetPrimaryPartCFrame(Vector3.new(0,0,0) ) is you will get a error of "Unable to cast Vector3 to CoordinateFrame"
Oops, I see what you mean. Thanks man! I didn't think of using the MoveTo function.
Also, that's why I said you put the Vector3.new() INSIDE the CFrame.new().