Is there anyway to move a Model relative the Model rotation? I tried TranslateBy and MoveTo but it needs Vector3
Use the model's cframe! Cframes have a special value called LookVector which can be used to move the model "forward"!
1 | local Part = script.Parent |
2 | local PPart = script.Parent.Part |
3 | Part.PrimaryPart = PPart -- Replace PPart with whatever part you want the primary part of your model to be! This is required! |
4 | while wait() do |
5 | Part:SetPrimaryPartCFrame(Part:GetPrimaryPartCFrame() + Part:GetPrimaryPartCFrame().lookVector * 3 ) -- The * 3 is to set the amount of units the model moves |
6 | end |
This will make the script's parent move in the direction it is facing :)