Hello! I've been experiencing this error with NumberValues and IntValues, I was wondering if anyone can help I guess.
local BuyAndSellAmount = script.Parent
local number = math.random(1,6)
while true do
wait(5)
if number == 1 then
local numb = 1
print("+1")
BuyAndSellAmount = BuyAndSellAmount + numb
elseif number == 2 then
local numb = 0.1
print("+0.1")
BuyAndSellAmount = BuyAndSellAmount + numb
elseif number == 3 then
local numb = 2
print("+2")
BuyAndSellAmount = BuyAndSellAmount + numb
elseif number == 4 then
local numb = 1
print("-1")
BuyAndSellAmount = BuyAndSellAmount - numb
elseif number == 5 then
local numb = 0.1
print("-0.1")
BuyAndSellAmount = BuyAndSellAmount - numb
elseif number == 6 then
local numb = 2
print("-2")
BuyAndSellAmount = BuyAndSellAmount - numb
end
Also note that im currenently trying to add/subtract 2 numbers every few seconds.

2 comments
What's the object of the BuyAndSellAmount
Just a tip, use the compounded operators +=, -=, *=, /=. x += y is the same as writing x = x + y.