How to have cframe toworldspace position and rotation not cancel eachother out

  1. What do you want to achieve? Keep it simple and clear!
    im trying to make it so when the player picks up a gun it goes into their right hip
  2. What is the issue? Include screenshots / videos if possible!
    if i put script.Parent.PrimaryPart.CFrame = player.Character.LowerTorso.CFrame:ToWorldSpace(CFrame.Angles(math.rad(90), math.rad(90), math.rad(0))) first, the gun is positioned the wrong way and if i use script.Parent.PrimaryPart.CFrame = togive.Character.LowerTorso.CFrame:ToWorldSpace(CFrame.new(1, 0, 0)) first then the gun is inside the torso, i need the gun to be pointed forward and the gun to be on the right hip
  3. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    i tried searching but there wasnt anything

images:


Did you try multiplying the result of the :ToWorldSpace function? CFrame’s can be multiplied by CFrame.Angles to position and rotate them. example: CFrame.new(0,5,0) * CFrame.Angles(math.rad(90),0,0) will put the cframe at 5 studs above 0,0,0 and rotate it on the x axis 90 radians

that worked! thx

ngl i feel a bit embarrassed now lol

1 Like

Hi @Olibobswobs, please mark jaelyn’s post as the Solution (the word Solution will be under their post, just click it so other people don’t take their time trying to fix an issue that’s already been solved.