Here is my code:
--Variables
local Drill = script.Parent
local DrillUpper = Drill:FindFirstChild("Drill upper")
local DrillTransparency = DrillUpper.Transparency
local Money = Drill.parent.parent:FindFirstChild("CurrencyToCollect")
--Variables
--Testing
print (DrillUpper.Name)
print (Drill.Name)
print (Money)
print (DrillTransparency)
--Testing
--Function
local function TransparencyTest()
print ("function works")
wait (2)
if DrillTransparency == 0 then
while (true) do
Money.value = Money.value + 1
print (Money)
wait(1)
end
end
end
--Function
--The program
TransparencyTest()
--The program
Why doesn't the object variable change?
It is no errors.
I saw im am not the only one having problems with this, but they deleted the code so I didn't understand it fully.

7 comments
Is the IntValue you are trying to change 'Money'? If so, a common mistake is to forget to access the Value property when updating IntValue values. Just use Money.Value instead. e.g. Money.Value = Money.Value + 1
@123marble that's the answer, put it as an answer so someone else doesn't
No I am not trying to change Money. I am trying to change CashToCollect object that is in the workspace. I have a variable in the upper section.
CashToCollect is assigned to the Money variable though?
yes
Use an if statement and a print() to see if Money is not nil.
I have tried and Money isn't nil. I just need help to change CashToCollect that is an int variable OBJECT. Money is just a variable I used in the script, if I need to delete it i will do it.