I was a little confused on the title, and you’ll be too. So I’ll explain better here with pictures.
This is my Rocket.
I need the rocket to reach the Red Block.
local moving = true -- just a variable so you can make it stop moving
while moving do
rocket.CFrame += rocket.CFrame.lookVector
wait(1/speed) -- speed here
end
Hey, That could work, but how would moving it go from there?
My original plan was to tween, but I’ve realized that the speed will be different every time basically
CFrame is position and orientation value of an object,
and really useful according to my experience with it, here an example for its uses
if you want to make the part go to a certain position using CFrame -
local rocket = game.worksapce.rocket
rocket.CFrame = CFrame.new(1,1,1) -- The rocket will go to this position
-- imagine it like vector3.new(1,1,1)
And if you want rotate it with CFrame -
rocket.CFrame = CFrame.Angles(math.rad(90),0,0) -- it will rotate to 90 with x axis (must use math.rad)
if want it to face another part like in your case -
local anotherPart = game.workspace.part
rocket.CFrame = rocket.CFrame * CFrame.new(rocket.Position,anotherPart.Position)
-- as you can see the first parameter is the where the rocket should be positioned,And the second parameter is where the rocket should looking at and both must be vector3 values
I hope i Helped you,its my first time at the Devfurom (:
Hey, for BodyGyro I believe the part needs to be unanchored sadly, so I don’t think it’ll move, that is unless there’s a way to keep it from falling with BodyGyro?
Also tried this, which works pretty well but it’s very very choppy.
Which I also believed you said tweening if there’s many wouldn’t be a good idea? There will be quite a few so I don’t think I’d be able to tween to fix the choppyness?
You would have to constantly update the position in order for this to work, as whatever the code is doing is it repositions the parts some studs towards the other part.
Hey I tried it but for whatever reason BodyGyro just spins it instead of moving it anywhere, I did check which faces are for the Rocket, but the Front adds up with the Front