Recently, I've been trying to use string/bool/number values in order to facilitate communication between scripts. I store those values inside ServerStorage. However, for some reason there is a numbervalue I am unable to change due to a weird error that keeps popping up in my output.
The script I'm using is rather long, so I'll only show a sniplet of it.
local SS = game:GetService("ServerStorage")
local RS = game:GetService("ReplicatedStorage")
local Bomb1 = RS:FindFirstChild("Bomb1")
local bCount = SS:FindFirstChild("bCount")
local pitch = SS:FindFirstChild("pitch")
local bombRate = SS:FindFirstChild("bombRate")
while true do
if bCount.Value >= 5 then
Bomb1.mainpart.Color = Color3.fromRGB(200, 255, 19)
pitch.Value = 0.9
bombRate.Value = 3
wait(0.1)
end
end
bCount, pitch and bombRate are all numbervalues, but in this script I only want to change pitch and bombRate's values.
This is what comes out of the output when bCount.Value >= 5 :
ServerScriptService.bombModifierScript:12: attempt to index number with 'Value' - Server - bombModifierScript:12
What's really grinding my gears is how it errors at the 12nd line, which isn't even the pitch value's line, it's the bombRate's value line. I don't understand how the script manages to change the value of pitch, yet it errors at bombRate.
There is another script in which I reference bombRate, but I'm 100% sure it has no influence on the script error behavior, though if you'd like I can show you the script if you need more clues.
Any form of help is appreciated

2 comments
I checked in the explorer with "bombRate" as keyword and the only thing that came up was my number value in the server storage. I'll post more of the code
@Auterus hey I just fixed it! Sorry for the late response :/