Hello! I want to create a spaceship with some particles. A seperate part on the spaceship is a particle emitter and I would like to keep it offset to the ship as shown, even when the ship changes position and rotation.
I looked up some other devforum posts and I found one for finding the offset for two parts then using that for another two parts; which doesn’t fit my situation.
Can you weld the particle emitter to the ship? Welding it will make it stay at a certain position constantly and change its angle and position as the ship moves.
If it is just being moved by scripts, you could do 3 things:
The first option would be just to have an AlignPosition and AlignOrientation that affect the part with the particle emitter. This could be an issue though if your ship moves fast.
The second option (the one you’re looking for) would be using LookVector, UpVector, or RightVector to offset the emitter. An example would be:
local base = --The base / primary part of the ship
local emitter = --The part you're trying to change.
emitter.CFrame = base.CFrame * CFrame.new(Base.CFrame.LookVector * -5) --5 would be half of the base size.
The third option would be to put the whole ship into a model, set the base as the PrimaryPart, and use model:SetPrimaryPartCFrame. By using this function, it moves everything in the ship model all at once, including the emitter.
Try this. Put everything into a model. The part that is having its position updated, Anchor it. The other part will be unanchored but welded to the part that is having its position updated.