Help with weldconstraints

  1. What do you want to achieve?
    I am trying to make a GUI which when you click it all the players touching a part will get welded and not be able to move or jump.
    Note : Part can move that’s why I am using weldconstraints

  2. What is the issue?
    The character weirdy freezes, I want to freeze it in a still pose.

  3. What solutions have you tried so far?
    I looked for solutions on the developer hub and I couldn’t find anyone with the same issue. And I simply don’t know what to do.

CODE:

local repEvent = game.ReplicatedStorage.Events.WeldThisNoob
local part = game.Workspace.Part
local eventOff = game.ReplicatedStorage.Events.UnWeldThisNoob


repEvent.OnServerEvent:Connect(function()
	    part.Touched:Connect(function(hit)
		hit.Parent.Humanoid.WalkSpeed = 0
		hit.Parent.Humanoid.JumpPower = false
		
		local LeftFoot = Instance.new("WeldConstraint")
		LeftFoot.Parent = hit.Parent
		LeftFoot.Part0 = part
		LeftFoot.Part1 = hit.Parent["Left Leg"]
		
		local RightFoot = Instance.new("WeldConstraint")
		RightFoot.Parent = hit.Parent
		RightFoot.Part0 = part
		RightFoot.Part1 = hit.Parent["Right Leg"]
		
		local RightArm = Instance.new("WeldConstraint")
		RightArm.Parent = hit.Parent
		RightArm.Part0 = part
		RightArm.Part1 = hit.Parent["Right Arm"]
		
		local LeftArm = Instance.new("WeldConstraint")
		LeftArm.Parent = hit.Parent
		LeftArm.Part0 = part
		LeftArm.Part1 = hit.Parent["Left Arm"]
		
		local Head = Instance.new("WeldConstraint")
		Head.Parent = hit.Parent
		Head.Part0 = part
		Head.Part1 = hit.Parent["Head"]
		
		local Torso = Instance.new("WeldConstraint")
		Torso.Parent = hit.Parent
		Torso.Part0 = part
		Torso.Part1 = hit.Parent["Torso"]
		
		local HRP = Instance.new("WeldConstraint")
		HRP.Parent = hit.Parent
		HRP.Part0 = part
		HRP.Part1 = hit.Parent["HumanoidRootPart"]
		return hit
	end)
end)

A pic of what happening
wewewewasda

1 Like

If I’m right, you’re welding the limbs to the part. Therefore the player’s character forms that odd pose because its limbs have to touch the part, arms included. What pose are you going for?

Someperson576

2 Likes

How can I achieve this pose?
(30charrrrrrs)

1 Like

Well, there are two ways that I can think of:

A. Weld the legs only.
B. Disable player movement

Try one or both, whichever you prefer.

2 Likes

I have mine player movement disabled already including jump.

Welding the legs make the character be in a tilt pose

Ok, if the player is already stuck, maybe edit the player character’s parts. Change their position, rotation, etc.

Is the pose you’re getting always the same no matter how many times you test?

1 Like

Have you tried just setting the player’s walk speed and jump power to 0?

1 Like

No its not always the same its quite random.

But I tried it with only

  • head
  • left and right foot
  • left and right arm

And it seems to be in a still pose
asdasd

(30 charrsrsrsrsrrrrrrrrrrrrrr)

its fine :smiley:

(ihatethis30charthing)

(30charshouldIhoponthebandwagon)

1 Like