Boss health balance

I got a boss, which has 300k hp since it’s impossible to defeat, I wanna make boss health + 10k per player. (I mean boss hp depends on how much players in server)

4 Likes

8 posts were merged out for being off-topic

local playerCount = #(game:GetService('Players'):GetPlayers())
local bossHealth = 300000 + playerCount*10000	--300k + 10k per player
4 Likes

Thanks, why I’m so dumb can’t even figure out so easy code. XD

Don’t worry about it. The more you work with it, the easier it gets.

Just a heads up, if a player leaves / join the game, the player count will still be the old one .

1 Like

Non-problem; new or leaving players are fine to ignore. Boss health is typically set when the NPC itself spawns, so there would be no need to account for dynamic scaling. It just needs to be called this way each time the health needs to be set rather than caching the playerCount for the rest of the session.

1 Like