Move object 1 stud ahead its facing

Hi how would I be able to use roblox physics to move an object 1 stud ahead its facing over like 0.6 seconds (while also ignoring gravity) because I cant currently think of a way to achieve this my mind is blank. Just need an idea to get me in the right direction.

You can use BodyMover | Roblox Creator Documentation s for this if you don’t want to CFrame the Parts.

2 Likes

I know you wanted physics, but an alternative is using code.
In the part’s CFrame, there is a sub-property called “LookVector,” which is the forward-direcition.

You could do something like

--// Assuming "PartCF" is the CFrame of the part
--// and that "Part" is the part itself,
Part.CFrame += PartCF.LookVector * 1 -- One stud, change the number to change the number of studs.

to move it.

5 Likes

You just have to multiply its CFrame and tween it to that CFrame.

local tweenService = game:GetService('TweenService')
local part = workspace.Part

local newCFrame = part.CFrame * CFrame.new(1,0,0)
tweenService:Create(part, TweenInfo.new(0.6), newCFrame):Play()
1 Like

I may be wrong but, shouldn’t it be:

CFrame.new(0, 0, -1)

instead? If I remember correctly, this should move the part to where it’s facing (the front side of the object) by a stud.

1 Like

Can’t remember, it might be that axis, it’s one of the 2. Def not Y.