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

How can I make a Player's arm collidable?

Asked by 7 years ago

This seems simple but I cant find an answer for this. Am trying to make a ragdoll script where the player is still alive. So I've made the script copy the limbs of the character and attached them to the torso with a socket constraint. unfortunately the arms hang through the ground. How do I make the arms collide with the ground?(setting the arms to CanCollide dos not work)

Heres the code I have for the ragdoll script if you are interested...

01local character = script.Parent
02local player = game.Players:GetPlayerFromCharacter(character)
03 
04player.PlayerGui.Health.Changed:connect(function()
05    print("HURT")
06    if player.PlayerGui.Health.Value > 0 then
07        character.Humanoid.PlatformStand = false
08    end
09    if player.PlayerGui.Health.Value <= 0 then
10        character.Humanoid.PlatformStand = true
11        local FakeArm = game.Lighting.FakeArm:Clone()
12        --find Left Arm
13        local children = character:GetChildren()
14        for i=1,#children do
15            if children[i].Name == "Left Arm" then
View all 28 lines...

1 answer

Log in to vote
0
Answered by 7 years ago

I solved this by changing the humanoid parent to lighting then putting it back to the character model (after the fake arm is set to Can Collide)

Ad

Answer this question