Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 3 years ago
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.

0
I think you want to do spree.Value on line 4 Spjureeedd 385 — 3y
0
@Spjureeedd Spree.Value won't work. I need to figure out how to update the damage if the number changes. TheBuliderMC 84 — 3y
0
Well that's not what you said Spjureeedd 385 — 3y

1 answer

Log in to vote
0
Answered by 3 years ago
Edited 3 years ago

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

0
That wouldn't work either. Spjureeedd 385 — 3y
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 Spjureeedd 385 — 3y
Ad

Answer this question