Limb health system

Have been trying to make a limb system, strated with the head one. So simply local script inside of starterplayer folder manages player bleeding UI and such stuff. However, even through I’ve managed to make a debuff stuff based on your limbs health, bandage still doesn’t work. It is a local script inside of a tool.

local player = game.Players.LocalPlayer
local hum = player.Character.Humanoid
local limbs = player.Limbs

local head = limbs.Head
local maxhead = limbs.MaxHead
local torso = limbs.Torso
local larm = limbs.LArm
local rarm = limbs.RArm
local lleg = limbs.LLeg
local rleg = limbs.RLeg

local equipped = false -- has no purpose yet
local using = false -- has no purpose yet

local mouse = player:GetMouse()
mouse.Button1Down:Connect(function()
	if hum.Health <= hum.MaxHealth then
			hum.Health = hum.MaxHealth
		elseif hum.Health >= hum.MaxHealth then
			if player.head.Value <= player.maxhead.Value then
				player.head.Value = player.maxhead.Value
		end
	end
end)

This will never go to the next elseif because it is checking if the health is less than or equals to max health, the health can never be greater than max health.

Change those if statements to this

if hum.Health < hum.MaxHealth then
elseif hum.Health == hum.MaxHealth then
end
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.