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

How do I add a NumberValue?

Asked by 9 years ago

I have a number value, and I need to add another 100 if a player touches a brick, any help? I have this code:

win=points+100

Is that wrong? Because it doesn't work...

0
Is 'win' a NumberValue or a variable? RedCombee 585 — 9y
0
Variable. antlerer 33 — 9y

1 answer

Log in to vote
0
Answered by
Uroxus 350 Moderation Voter
9 years ago

I found a question, and just modified the code a little. Im not sure if this works, I dont have time to test, But its better than nothing. Hopefully it does work correctly :)

script.Parent.Touch:connect(function(Hit)
Player = Game.Players:GetPlayerFromCharacter(Hit.Parent)
if Player then
game.Workspace.NumberValue + 100
0
Doesn't work :c antlerer 33 — 9y
0
Did you put this script inside of the part? Uroxus 350 — 9y
Ad

Answer this question