Still have questions? Join our Discord server and get real time help.
Log in to vote

Ragdoll button wont stop killing my character?

Asked by 3 days ago

Ok so I wanna make a ragdoll button, but it wont kill the player, it just ragdolls them and if they click the button again theyll just stand back to normal where they are

local button = script.Parent

        local player = game.Players.LocalPlayer
        local c = player.Character

--c.Humanoid.RequiresNeck = false

            for _, v in pairs(c:GetDescendants()) do
                if v:IsA("Motor6D") then
                    local a0, a1 ="Attachment"),"Attachment")
                    a0.CFrame = v.C0
                    a1.CFrame = v.C1
                    a0.Parent = v.Part0
                    a1.Parent = v.Part1

                    local b ="BallSocketConstraint")
                    b.Attachment0 = a0
                    b.Attachment1 = a1
                    b.Parent = v.Part0

            c.HumanoidRootPart.CanCollide = false

I heard of this thing called Humanoid.RequiresNeck = false but even that didnt help either I put it just below the function, I also tried changing v:Remove() as that is basically just breakjoints but they still died anyway? im really confused and help would be appreciated

Okay but maybe if you read my post I actually did try several things to fix it? try reading a bit more slower THEGOBLINTOPLAD 0 — 3d

1 answer

Log in to vote
Answered by 3 days ago

Well it appears that the Humanoid.RequiresNeck line is commented out- though I will assume you did this after you tested. Anyways, it's important that you do not touch the HumanoidRootPart of the Character, and I don't see how doing this to hats is relevant, so I suggest using GetChildren instead of GetDescendants and adding a check to ensure you aren't modifying the HumanoidRootPart of the Character.


Answer this question