Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How can I make a Player's arm collidable?

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...

local character = script.Parent
local player = game.Players:GetPlayerFromCharacter(character)

player.PlayerGui.Health.Changed:connect(function()
	print("HURT")
	if player.PlayerGui.Health.Value > 0 then
		character.Humanoid.PlatformStand = false
	end
	if player.PlayerGui.Health.Value <= 0 then
		character.Humanoid.PlatformStand = true
		local FakeArm = game.Lighting.FakeArm:Clone()
		--find Left Arm
		local children = character:GetChildren()
		for i=1,#children do
			if children[i].Name == "Left Arm" then
				local clone = children[i]:Clone()
				FakeArm.RealArmAttachment.Parent = children[i]
				FakeArm.FakeArmAttachment.Parent = clone
				FakeArm.BallSocketConstraint.Parent = clone
				clone.BallSocketConstraint.Attachment1 = children[i].RealArmAttachment
				clone.BallSocketConstraint.Attachment0 = clone.FakeArmAttachment
				children[i].Transparency = 1
				clone.Parent = character
			end
		end
		FakeArm.Parent = character
	end
end)

1 answer

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)

This discussion is preserved as it was. New answers, comments, and votes are closed.