Moving a part relative to its rotation

as said in title im trying moving part relative to its rotation using the tween service, i found this formula

Beam.RedMesh.CFrame + Beam.RedMesh.CFrame.LookVector *,0,0)

hoever it gives me an error that i don’t really understand*

1 Like

I don’t understand, are you trying to rotate a part to a specific rotation?

as i don’t know what orientation the beam is going to have since its relative to the player’s rotation on cast, im trying to move it relativly to the rotation of the beam instead of moving it based on world axis XYZ

Maybe this

CFrame.New(Beam.RedMesh.CFrame.Position + Beam.RedMesh.CFrame.LookVector) *,0,0)
1 Like

okay i think i have solved the problem myself before but since i wasn’t played the tween it was just not moving, thats anyways you’re line was working fine (exept the CFrame.New, the n was in captial :stuck_out_tongue: ) thanks anyways (wait you’re goated)

More understandable code :- (rename variables as your part)

local part = workspace.Part
part.Position += part.Cframe.LookVector *,y,z) --change the x,y and z with the local x, y and z movement with the part you want.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.