So im quite new to scripting and I just got the part of FindFirstChild and I'm attempting to make a stat that combines all the numbers of the other 3 stats Blue,Red and White but it gives the error in the title can someone help?And if there is another way of achieving what I want I would like to know.Here is my code:
while wait() do
local player = game.Players.LocalPlayer
local estats = player:FindFirstChild("stats")
local white estats:FindFirstChild("White")
local red = estats:FindFirstChild("Red")
local blue = estats:FindFirstChild("Blue")
local all = estats:FindFirstChild("All")
all.Value = blue.Value + red.Value + white.Value
end

6 comments
it says nil, and it says findfirst child, this means one of your lines is looking for a value that doesnt exist, or doesnt exist yet, try doing while true do, and just putting wait() as first line in loop, in case it executes code THEN waits
Create your locals outside(above) the while loop, leaving just the 'all.Value = ...' line inside it.
good suggestion
Thanks for all your suggestions sadly it still gives me the same error and I have tried all of the suggestions.
I buddy! Can you please create a new script and insert the following code:
warn(game.Players.LocalPlayer:GetChildren()). If it prints an empty table, then Stats is not a member of Player.Tried it,it's true nothing shows but if I go into my player manually after starting the game the stats folder does indeed show.Maybe it's that my script misses something.