Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why isn't my weld working and making my character glitch?

Asked by 5 years ago

Hello, I am trying to make a script were a claw summons and gets welded onto the players hand. Here is what I tried to do.

event.OnServerEvent:Connect(function(player, damage)
    local claw = script.Claw:Clone()
    claw.Parent = game.Workspace
    local weld = Instance.new("WeldConstraint")
    weld.Part0 = player.Character.RightHand
    weld.Part1 = claw
    weld.Parent = claw
end)

The problem that I am having is that the claw is not visible even though its parented to workspace and its transparency is 0. And another problem that I am having is that the claw makes my character glitch and no longer be able to move.

How do I fix this? Thank you for your time!

1 answer

Log in to vote
0
Answered by 5 years ago

Try reversing the weld order, for example on line 5, instead of putting weld.Part0 = player.Character.RightHand, put weld.Part0 = claw and same with weld.Part1. It should look like this:

weld.Part0 = claw
weld.Part1 = player.Character.RightHand
0
Hmmm still doesn't seem to work turbomegapower12345 48 — 5y
Ad

Answer this question