title says a lot about this post, how do I position an attachment?
I tried this:
if typeof(position) == "Vector3" then
attach.Position = attach.Position + position
print("moved!")
end
even that didn’t work, even though it printed ‘moved!’. Any ideas on how I would move this attachment? (or this part entirely) since if you didn’t see my last post and my other post I use this technique to put swords in my character’s hand:
How would I move the attachment (or actually, the part) entirely?
Thanks!!
Attachment position is relative to its parent part, so you just need to set a vector to whatever you want and then the attachment will move accordingly. For example, if you ever wanted an attachment 3 studs down you just need to do attach.Position = Vector3.new(0, -3, 0) and it will always appear 3 studs down from whichever part its parented to.
You only need WorldPosition if you want to modify an attachment in world space but that typically isn’t necessary for most use cases of attachments except global propagators (sound emission, particles, proximity prompts, so on). Tool attachments are not one such case.
I’m not sure what you were originally trying to do here and there’s no video showing what happens with your attempts so it’s pretty unclear what you’re trying and what results they’re giving, but parts aren’t supposed to move when you move the attachment.
If you’re concerned about the part not moving when you update the attachment, that’s because a weld is created between two parts using attachment data for the offsets. Moving the attachments will not update the positioning of the part in real time. You can either move the attachment yourself on the model as you’ve already done or if you need dynamic positioning then change the position before adding the accessory to the character.