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

Help with blood decals appearing on the player when damaged?

I'm trying to make a script that will cause blood decals to appear on the player at various health intervals. however, the blood decals wont appear ontop of any clothing on the character. Here's a part of my script that creates one of the decals.

humanoid.HealthChanged:Connect(function()
if humanoid.Health  <= 80 then 
	Instance.new("Decal", bodyparts.RightLowerArm)
		bodyparts.RightLowerArm.Decal.Texture = "rbxassetid://247766283"
		bodyparts.RightLowerArm.Decal.Face = Enum.NormalId.Back
		bodyparts.RightLowerArm.Decal.Transparency = 0
	end
end)

1 answer

For me everything is working correctly. The script I used for testing is

local Players = game:GetService("Players")

Players.PlayerAdded:Connect(function(player)
	player.CharacterAdded:Connect(function(character)
		local humanoid = character.Humanoid
		humanoid.HealthChanged:Connect(function()
			if humanoid.Health  <= 80 then 
				local BloodDecal = Instance.new("Decal", character.RightLowerArm)
				BloodDecal.Texture = "http://www.roblox.com/asset/?id=247766282"
				BloodDecal.Face = Enum.NormalId.Back
				BloodDecal.Transparency = 0
			end
		end)
	end)
end)

also the script is in ServerScriptService.

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