How to weld a model to your hand through a script. [R6]

Hey, (I don’t know if I’m supposed to put this in building or scripting support, so correct me if It’s in the wrong category.

Anyways, I have never worked through welds through scripts. I don’t work with welds ever, but when I need it I just use F3X, so now I am asking for help on what to do to fix this mess I created.

So my goal was to create these aircraft marshalling sticks:

But with my script, I end up with this.

So, how can I get it rotated the right way, and not squished up in one little area? Any replies will be helpful, thank you! :slight_smile:

Oh yes, and here is my script:

game.Players.PlayerAdded:Connect(function(plr)
	wait(1)
	local char = plr.Character
	for i,v in pairs(workspace.Model:GetChildren()) do
		local weld = Instance.new("Weld", v)
		weld.Part0 = char["Left Arm"]
		weld.Part1 = v
		weld.C0 = CFrame.new(0, -1, 0)
		v.Anchored = false
	end
	char["Left Arm"].Anchored = false
end

And this is my model:

-Thank you for your help,
Itz_bobbeh

What u want to do is treat the light thingy as an actual joint/limb. Then from there you can just animate it to be still.

I don’t know if this is what your intention was, however I have a very simple fix for you as I am currently finishing up creating my own marshalling sticks.

What I did, is create the various marshalling signals by positioning the marshalling sticks early-on (as seperate tools though!). Afterwards, I’ll turn them into actual tools with your usual handles (with Touchinterest) and such.

In order to create the part where the left arm lifts up just like the right arm, you’d have to create a new animation (preferably using a blocky R6 character with the animation editor plugin). If you want to keep things simple, just turn both arms at the desired holding angle. Change the animation priority to “Action” in order to prevent the left arm from quitting the animation.

Publish the animation, keep the animation ID at hand as you’ll need it.

Back to the tool you just made: Add a script, and put in this:

Then, add an Animation object (same way as you added a new script to the tool). Change the AnimationId value to the Id of your animation.

You might want to add a “qPerfectionWeld” script to your tool.

After you’ve done all this (and ensured your marshalling sticks are unanchored if you went with the qPerfectionWeld script!), you should be able to properly use said marshalling sticks as desired!

Let me know if you run into any errands, and I’ll try to help you as best to my ability.

-Tiff

You’ll want to adjust the C0 to change the angle of your motor or weld.

e.g

local motor = part.Motor
motor.C0 = CFrame.new(0,0,0) * CFrame.Angles(0,5,0)

Play around with the coordinates until they fit to your liking. Also you can use weld plugins to weld the model (RigEdit, OzzyPig’s Weld Plugin), then just add a motor to the grip and adjust like I said.

First - Set model primary part and use Model:SetPrimaryPartCFrame() - due to thing you pointing objects at the same position. Also add weld to model childrens.
Second - Sometimes you need set not only position of CFrame, try use CFrame.new(x, y, z) * CFrame.Angles(math.rad(degrees),math.rad(degrees),math.rad(degrees))
math.rad(degrees) - needed for converting degrees in radians, due to CFrame properties.