Hello!
I was working on a tool script, and as always, it was bugged.
I made a script that basically makes it so when you equip the tool, it changes the position of a handle to match the position of the left arm.
However, if you’re moving and you equip the tool, the rotation and position ends up flying itself out of a window and completely bugs out.
If you dont know what I mean, if you are moving and you equip the tool, it ends up going ontop of your shoulders instead of inside your hand.
Heres my script:
local handle2 = tool.Handle2
if tool.Parent:FindFirstChild("Left Arm") then
handle2.Position = tool.Parent["Left Arm"].Position + Vector3.new(0, -1, -0.2)
handle2.Orientation = tool.Parent["Left Arm"].Orientation + Vector3.new(-90, 0, 0)
local weld = Instance.new("WeldConstraint")
weld.Parent = tool.Parent["Left Arm"]
weld.Part0 = tool.Parent["Left Arm"]
weld.Part1 = handle2
end
Any help is appreciated.