Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Is there anyway to move a Model relative the Model rotation?

Is there anyway to move a Model relative the Model rotation? I tried TranslateBy and MoveTo but it needs Vector3

1 answer

✓ Accepted answer

Use the model's cframe! Cframes have a special value called LookVector which can be used to move the model "forward"!

local Part = script.Parent
local PPart = script.Parent.Part
Part.PrimaryPart = PPart -- Replace PPart with whatever part you want the primary part of your model to be! This is required!
while wait() do
	Part:SetPrimaryPartCFrame(Part:GetPrimaryPartCFrame() + Part:GetPrimaryPartCFrame().lookVector * 3) -- The * 3 is to set the amount of units the model moves
end

This will make the script's parent move in the direction it is facing :)

This discussion is preserved as it was. New answers, comments, and votes are closed.