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

What are numbervalues, and how can I utilize them?

Asked by 8 years ago

Hi

Upon entering this into a script game.ServerStorage.Level.boss.boss.Human.Health = game.ServerStorage.Level.boss.boss.Human.Health * level

where level is a numbervalue set to 1, i get the following error.

Workspace.Control.Control:38: attempt to perform arithmetic on local 'level' (a userdata value)

1 answer

Log in to vote
0
Answered by
RubenKan 3615 Moderation Voter Administrator Community Moderator
8 years ago

use level.Value instead.

Numbervalues (And all other Value Instances) have a property called "Value", wich is where the value is stored. Use this and the script wont error.

Ad

Answer this question