What do you want to achieve?
MainMissilePartVar(Which is a variable in my script) to face the front face of its self, in other words the only way it can face is wherever the front face of MainMissilePartVar is pointing.
What is the issue?
Their is no problem I just simply do not know how to do it.
*NOTE: I AM NOT TRYING TO FIX A SCRIPT I JUST WANT TO KNOW HOW TO DO THIS
Their is more code but that is pretty much all you need to know
local MainMissilePartVar = script.Parent.MainMissilePart
The issue with making a Part face wherever it is facing is that if anything causes it to go âoff courseâ or rotate it will just continue to travel off course.
How are you making the missile move? CFraming? Velocity? We need more information in order to help you with your issue.
CFrame.lookAt() will do what you want to accomplish, alternatively CFrame.new()
So your script would look like this:
local part = game.Workspace.Part
local target = game.Workspace.Target
part.CFrame = CFrame.lookAt(part.Position, target.Position)
However, such a system is probably not ideal for a missile system because the part would have no physics, youâd have to repeatedly update the position and lookAt CFrame and it would clip through parts.
The more realistic approach is to use bodymovers. Something known as a RocketPropulsion bodymover. So add it into the part, and do the following:
local part = game.Workspace.Part
local target = game.Workspace.Target
part.RocketPropulsion.Target = target
part.RocketPropulsion:Fire()
Hey thanks for trying to help but unfortunetly this isnât what I need, what I need is for when the game starts, it gets the front face of a position, and then only travel in that kind of line.
Hey probably should of explained this better my fault but I dont want to move the part as I already have a tween to move the part, I just dont want the part to wobble everywhere while its going straight up, without having to anchor parts.