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

How do I increase HIT_DAMAGE when a player has a high spree?

local HIT_DAMAGE = 45
local player = game.Players.LocalPlayer
local spree = player.leaderstats:WaitForChild("Spree")
HIT_DAMAGE = HIT_DAMAGE+spree

local script (this is sent in discord, but changed it up a bit.)

This looks really wrong just by looking at it. Can't figure out how to do this.

4 comments

0

I think you want to do spree.Value on line 4

0

@Spjureeedd Spree.Value won't work. I need to figure out how to update the damage if the number changes.

0

Well that's not what you said

1 answer

Try adding a number value and change

local HIT_DAMAGE = 45

to this

local HIT_DAMAGE = numbervalue.Value -- change the numbervalue to where your numbervalue is located at

Then change the number value whenever someone gets a high spree

2 comments

0

That wouldn't work either.

0

If we say numbervalue.Value is equal to 100 when we set the variable, then the variable HIT_DAMAGE will stay at 100 even if we change numbervalue.Value. Unless you update the value, which from your code I just assumed you don't

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