I am making a boss system that distribute the reward by the players who damaged the boss.
local damages = game.ServerStorage.Damages[boss.Name]
for i,v in pairs(damages:GetChildren()) do
if game.Players:FindFirstChild(v.Name) then
local fullLife = boss.Config.FullLife.Value
local reward = boss.Config.Reward.Value
local damagedCaused = v.Value
end
end
I am trying to get how many percentage the damage caused is of the full life, to so give the obtained percentage of the reward. How can I do this?