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

Ragdoll without removin humanoid from actual player using :clone()?

Trying to create a script where the player goes invisible while a clone of their character is made when their health is below 5. Then when the clone is made it goes into a rag doll state by losing its humanoid. Then when they have more then 5 health the clone is destroyed and the player comes visible again, but it says I'm attempting to index local 'Fake' which is an nil value.


Humanoid.Changed:connect(function()
	if Humanoid.Health <= 5 then
		local Fake = Player.Character:Clone()
		Fake.Humanoid.PlatformStand = true
		Fake.Humanoid:Destroy()
		for _,v in pairs(char:GetChildren()) do
			if v.className == "Part" then
				v.Transparency = 1
			elseif v.className == "Hat" then
				v.Handle.Transparency = 1
	elseif Humanoid.Health > 5 then
		Fake:Destroy()
		for _,v in pairs(char:GetChildren()) do
			if v.className == "Part" then
				v.Transparency = 1
		    	elseif v.className == "Hat" then
				v.Handle.Transparency = 0
			end
		end
	end	
	end
	end
end)	

2 comments

0

What? Do you mean making the player fall around or do you mean advanced Ragdoll mechanics?

0

I mean making the player fall

1 answer

Use humanoid.PlatFormStand = true and loop it.

Thats the only other way, sorry!

2 comments

0

Can you show me that in a script?

0

I changed the question up a bit so dont mind the previous answers.

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