Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

How do I change the orientation of a welded part?

I have a shield thats welded to your offhand arm when you equip your weapon, the script is below:

// script.Parent is the tool btw, and the parent of that is player

script.Parent.Changed:Connect(function(c)
	if c == "Parent" and script.Parent.Parent:FindFirstChild("RightHand") ~= nil then
		local handle = script.Parent.Handle2
		local arm = script.Parent.Parent["LeftLowerArm"]
		w = Instance.new("Weld")
		w.Parent = script.Parent.Parent["LeftLowerArm"]
		w.Part0 = w.Parent
		w.Part1 = script.Parent.Handle2
		
		
	end
end)

When I equip the shield it faces towards the players arm instead of facing outwardly, how do I change that. I've tried changing the orientation manually by script but that didn't work.

1 answer

✓ Accepted answer

Here you go:

--the vector3 angles you change you what you need.
handle.Orientation = Vector3.new(0, 0, 0)

:D

This discussion is preserved as it was. New answers, comments, and votes are closed.