Moving a part position to another part, then changing a specific axis

  1. What do you want to achieve? Keep it simple and clear!
    Basically, i’m making a transformation for my game and it’s really complex. I decided to make some thunders that go randomly around the character. So, I decided to try and find a solution by changing the position to the Character.UpperTorso, then changing randomly the X position of the thunder from a min to max distance.
  2. What is the issue? Include screenshots / videos if possible!
    I can’t find anything related to this! I’ve been trying searching on the forum and on Roblox Dev Hub. I tried looking at CFrame and BasePart.Position to see if there was anything related to this, but I can’t find anything.
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    You can be sure I did.
    After that, you should include more details if you have any. Try to make your topic as descriptive as possible, so that it’s easier for people to help you!

I’m pretty sure it’s not that hard to do, but I don’t deal with CFrame or Position that much, so i’m not an “expert” in this.

I don’t want scripts written for me, but I would like that someone explains me a way to do this OR that links some pages that can be helpful, so I can learn by myself instead of copying. Any help is appreciated! :slight_smile:

You would just use + Vector3.new() or + CFrame.new(). You would add the axis you want and leave the others at 0.

You mean:
BasePart.Position = BasePart.Position + Vector3.new(5, BasePart.Position.Y, BasePart.Position.Z) ?

This is correct but if you’re only changing one axis, you would just put 0 at the other ones to not mess with them.

Alright, got it. I’ll try it. Thank you a lot!