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 make a weapon which damage scales on the level of the wielder?

i want to make a weapon that damage scales on the level of the wielder for example say i had a sword now for every level i would want the damage to increase by +1 but how would i check whenever the level is changed or character died or maybe even when it gains a new player ( that is if the weapon is in a dropper that u get from dropping) So please help me understand how would i check all these factors and assign the proper damage for the damage scaling weapon

3 comments

0

Use .Changed or :GetPropertyChangedSignal() for changes and Humanoid.Died for character death

0

and how would i find the actual wielder guy? idk for that

0

Can you please give some info on how your level system works and where the player's level is stored?

1 answer

Levels aren't part of Roblox by default so I assume you already have it scripted in. So only you know how to check a player's level! If it were me, I would use an intValue inside the player that stores the player's level. That way I can do player.intValue.Value to check.

How does damage scale? Most developers create their own formula (formulae as in maths). In your case, since you want the damage to change by one per level you can simply do 15 + player.intValue.Value. This depends on whether you know how to change the damage amount, if you have not scripted your own weapons this means you'll have to dredge through the weapons code and change it according to your needs.

Ultimately since you have shared no code, there is nothing we can do to help you. I have only given you something to guide you.

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