Why my ragdoll is fly?

I don’t know why my ragdoll flies. I’ll give a script, please help me!

:sleepy: :sleepy: :sleepy: :sleepy:

Settings.Hitbox.Touched:Connect(function(Hit)
	local effect = script.Parent.Handle.RRR:Clone()
	local Mod = Hit.Parent
	
	if CanDamage == true then 
	
		while not Mod:FindFirstChild("Humanoid") and Mod.Parent ~= game do 
			Mod = Mod.Parent
		end
		local Hum = Mod:FindFirstChild("Humanoid")
		local isblock = Hum:FindFirstChild("isblock")
		if game.Players:findFirstChild(Hum.Parent) then 
			local TarPlr = game.Players:findFirstChild(Hum.Parent)
			if Settings.TeamKill == false then
				
				if isblock then
					if isblock.Value == true then
						local hitSFX = Instance.new("Sound",Hit.Parent.Head)
						hitSFX.SoundId = "rbxassetid://131237241"
						hitSFX.Volume = 2
						hitSFX:Play()
						Hum:TakeDamage(5)
					elseif isblock.Value == false then
						Hum:TakeDamage(5)
						local Creator_Tag = Instance.new("ObjectValue")
						Creator_Tag.Name = "creator"
						Creator_Tag.Value = Plr
						Creator_Tag.Parent = Hum
						game:GetService('Debris'):AddItem(Creator_Tag, 2)
					end
				end
				CanDamage = false
				if Hum.Health == Hum.MaxHealth then
			
				else
					if isblock.Value == false then
						Hum:TakeDamage(5)
						for _, v in pairs(Hit.Parent:GetDescendants()) do
							if v:IsA("Motor6D") then
								local a0, a1 = Instance.new("Attachment"), Instance.new("Attachment")
								a0.CFrame = v.C0
								a1.CFrame = v.C1
								a0.Parent = v.Part0
								a1.Parent = v.Part1
								local b = Instance.new("BallSocketConstraint")
								b.Attachment0 = a0
								b.Attachment1 = a1
								b.Parent = v.Part0
								v.Enabled = false
							end
						end
						
						local Creator_Tag = Instance.new("ObjectValue")
						Creator_Tag.Name = "creator"
						Creator_Tag.Value = Plr
						Creator_Tag.Parent = Hum
						game:GetService('Debris'):AddItem(Creator_Tag, 2)
						effect.Parent = Hit.Parent.Head
						effect['Barrage [A]']:Emit(3)
						effect.Dots:Emit(1)
						effect["Lines [1]"]:Emit(3)
						effect["Lines [2]"]:Emit(3)
						local hitSFX = Instance.new("Sound",Hit.Parent.Head)
						hitSFX.SoundId = "rbxassetid://566593606"
						hitSFX.Volume = 2
						hitSFX:Play()
						wait(0.4)
						effect:Destroy()
						wait(1)
						for _,v in pairs(Hit.Parent:GetDescendants()) do  --unragdoll
							if v:IsA('Motor6D') then
								v.Enabled = true
							end
							if v.Name == 'BallSocketConstraint' then
								v:Destroy()
							end
							if v.Name == 'Attachment' then
								v:Destroy()
							end
						end
					end
				end
			elseif Settings.TeamKill == true or TarPlr.Neutral == true then
				CanDamage = false
				if Hum.Health == Hum.MaxHealth then
					
				else
					Hum:TakeDamage(5)
					for _, v in pairs(Hit.Parent:GetDescendants()) do
						if v:IsA("Motor6D") then
							local a0, a1 = Instance.new("Attachment"), Instance.new("Attachment")
							a0.CFrame = v.C0
							a1.CFrame = v.C1
							a0.Parent = v.Part0
							a1.Parent = v.Part1
							local b = Instance.new("BallSocketConstraint")
							b.Attachment0 = a0
							b.Attachment1 = a1
							b.Parent = v.Part0
							v.Enabled = false
						end
					end
					local Creator_Tag = Instance.new("ObjectValue")
					Creator_Tag.Name = "creator"
					Creator_Tag.Value = Plr
					Creator_Tag.Parent = Hum
					game:GetService('Debris'):AddItem(Creator_Tag, 2)
					effect.Parent = Hit.Parent.Head
					effect['Barrage [A]']:Emit(3)
					effect.Dots:Emit(1)
					effect["Lines [1]"]:Emit(3)
					effect["Lines [2]"]:Emit(3)
					local hitSFX = Instance.new("Sound",Hit.Parent.Head)
					hitSFX.SoundId = "rbxassetid://566593606"
					hitSFX.Volume = 2
					hitSFX:Play()
					wait(0.4)
					effect:Destroy()
					wait(1)
					for _,v in pairs(Hit.Parent:GetDescendants()) do  --unragdoll
						if v:IsA('Motor6D') then
							v.Enabled = true
						end
						if v.Name == 'BallSocketConstraint' then
							v:Destroy()
						end
						if v.Name == 'Attachment' then
							v:Destroy()
						end
					end
				end
			end
	
		else 
			
			if Settings.KillNPCs == true then
				Hum:TakeDamage(5)
				CanDamage = false
				if Hum.Health == Hum.MaxHealth then
				else
					for _, v in pairs(Hit.Parent:GetDescendants()) do
						if v:IsA("Motor6D") then
							local a0, a1 = Instance.new("Attachment"), Instance.new("Attachment")
							a0.CFrame = v.C0
							a1.CFrame = v.C1
							a0.Parent = v.Part0
							a1.Parent = v.Part1
							local b = Instance.new("BallSocketConstraint")
							b.Attachment0 = a0
							b.Attachment1 = a1
							b.Parent = v.Part0
							v.Enabled = false
						end

							if v:IsA('Part') then
								v.CanCollide = true
				
						end
					end 
	
					local Creator_Tag = Instance.new("ObjectValue")
					Creator_Tag.Name = "creator"
					Creator_Tag.Value = Plr
					Creator_Tag.Parent = Hum
					game:GetService('Debris'):AddItem(Creator_Tag, 2)
					effect.Parent = Hit.Parent.Head
					effect['Barrage [A]']:Emit(3)
					effect.Dots:Emit(1)
					effect["Lines [1]"]:Emit(3)
					effect["Lines [2]"]:Emit(3)
					local hitSFX = Instance.new("Sound",Hit.Parent.Head)
					hitSFX.SoundId = "rbxassetid://566593606"
					hitSFX.Volume = 2
					hitSFX:Play()
					wait(0.4)
					effect:Destroy()
					wait(1)
		
					Hit.Parent.Humanoid:ChangeState(Enum.HumanoidStateType.GettingUp, true)
					for _,v in pairs(Hit.Parent:GetDescendants()) do  --unragdoll
						if v:IsA('Motor6D') then
							v.Enabled = true
						end
						if v.Name == 'BallSocketConstraint' then
							v:Destroy()
						end
						if v.Name == 'Attachment' then
							v:Destroy()
						end
						if v:IsA('Part') then
							v.CanCollide = false
						end
						if v:IsA('Part') then
							if v.CanCollide == true then
							end
						end
					end
				end
			else 
				return
			end
			
		end
	end
end)

this is video ! :grinning:
robloxapp-20220806-1251504.wmv (1.9 MB)

1 Like

hi buddy try to set the humanoid.HipHeight to 0 this worked for me

i think iam too late this topic created 2 years ago !

Oh, Oh, I saw this reply after a month. Right. It’s been a long time since I threw it away.:upside_down_face:

1 Like

are you still facing the same issue ?