I made a script where it welds a part to Left Hand, but it keeps welding Left Hand to a Part how do I fix this? Here's my script but please refrain from saying "You're Dumb" instead of answering the question like the responses I normally get. Also I already tried flipping Part0 and Part1 and it didn't work, so are there other reason this could be occuring?
plr = game:GetService("Players").LocalPlayer
char = plr.character
rad = math.rad
s = char:WaitForChild('WhiteBlack')
sw = s.Handle
wc = s.Handle.WeldConstraint
local w = Instance.new('Weld', sw)
lh = char:WaitForChild('LeftHand')
function onKeyDown(inputObject, gameProcessedEvent)
if inputObject.KeyCode == Enum.KeyCode.Q then
print("Q was pressed")
w.Part0 = sw
w.Part1 = lh
sw.WeldConstraint.Enabled = false
w.C0 = CFrame.new(0,0,0) * CFrame.Angles(rad(45),rad(0),rad(0))
end
end
game:GetService("UserInputService").InputBegan:connect(onKeyDown)

3 comments
You're Dumb
lmaoo
Make sure your part is not Anchored.