Attempt to index number (numbervalue) with "value"

I wrote a code for an one hour timer and on line 18 I get this error: attempt to index number with 'Value' this is my code, I’ll be writing comments on the code block to help explain more of what I’m trying to do.

--[[
so essentially how it works is that i am just, every second changing 
numbervalues and on a local script it adjusts the values and makes it look like a timer
on the Gui ex: 12:40, like that (it counts down btw)
--]]

game.Players.PlayerAdded:Connect(function()--this event wasn't originally here, i added it because maybe I thought that the script was being read before the stuff loaded in.
	while true do
		minutesvalue.Value = 60--both of these values are in a folder that is in replicated storage
		secondsvalue.Value = 19
		repeat wait() until minutesvalue:IsA("NumberValue")--I also added this but its useless.
		repeat
			if minutesvalue.Value ~= 0 then--THIS IS WHERE THE ERROR IS, checks to see if the timer is on anything but 0
				if secondsvalue.Value == 59 then--empty if statement, i planned to do more but ran into this issue
					
				end
				if secondsvalue.Value == 1 then--if it his one second left, the next minute starts
					minutesvalue.Value = minutesvalue.Value - 1
					secondsvalue.Value = 59
				else
					secondsvalue.Value = secondsvalue.Value - 1--if its not the end of the minute yet, just keep counting
				end
			else
				if minutesvalue.Value == 0  then--if it is at zero
					secondsvalue.Value = secondsvalue.Value - 1--continues counting the remaining 59 seconds
					if secondsvalue.Value == 0 then--once its done do something
						print("test")--wanted to see
					end

				end
			end

			wait(1)
		until secondsvalue.Value <= 0 and minutesvalue.Value <= 0--ends the repeat  loop

	end
end)

so again, the two numbervalues, the minutes and seconds, are both in replicated storage, i don’t know if that has anything to do with it, so like i said, the error is on this simple if statement:

if minutesvalue.Value ~= 0 then --[[THIS IS WHERE THE ERROR IS,
 checks to see if the timer is on anything but 0

and these are how both of those variables are defined:


local rep = game:GetService("ReplicatedStorage")
local players = game:GetService("Players")
local minutesvalue = rep.jkds:WaitForChild("Minutes")--
local secondsvalue = rep.jkds:WaitForChild("Seconds")--
local minutes = 60 
local seconds = 19

What is the value at the time of checking the if statement. I’m assuming this an error because the variable set isn’t a integer. (Is this an integer value?)

it is nil but i’m using a numbervalue, i’m gonna try changing them to see if it works

hold on, they are both set to zero not nil

yes, changing the values from 0 and 0 to 60 and 19 prior to the game running solved my issue