-- Server Script (ضعه في ServerScriptService) local function ragdollCharacter(character) local humanoid = character:FindFirstChild("Humanoid") if not humanoid then return end humanoid.BreakJointsOnDeath = false humanoid.RequiresNeck = false -- مهم للرأس for _, joint in pairs(character:GetDescendants()) do if joint:IsA("Motor6D") then local socket = Instance.new("BallSocketConstraint") local att0 = Instance.new("Attachment") local att1 = Instance.new("Attachment") att0.Parent = joint.Part0 att1.Parent = joint.Part1 att0.CFrame = joint.C0 att1.CFrame = joint.C1 socket.Parent = joint.Parent socket.Attachment0 = att0 socket.Attachment1 = att1 socket.LimitsEnabled = true socket.TwistLimitsEnabled = true socket.UpperAngle = 90 -- يمكنك تعديل الأرقام لتحكم أفضل socket.TwistUpperAngle = 45 socket.TwistLowerAngle = -45 joint:Destroy() end end humanoid.PlatformStand = true humanoid:ChangeState(Enum.HumanoidStateType.Ragdoll) end -- مثال: Ragdoll عند الموت game.Players.PlayerAdded:Connect(function(player) player.CharacterAdded:Connect(function(character) local humanoid = character:WaitForChild("Humanoid") humanoid.Died:Connect(function() ragdollCharacter(character) end) end) end)