so i made a code that should print out "What" but it does not and what error prints out? attempt to index nil with 'FindFirstChild' so it means that the "FindFirstChild" has a problem
NOTE: just to clarify i rewrote my whole script and i did not notice but i wrote "Crowns" but i was supposed to write "Coins" but even if i correct the code and i try it in a new fresh game it still does not work.
here is my code:
print("gygfg")
local Newfolder = game.Players:FindFirstChild("Coins")
print("uhm")
game.Players.PlayerAdded:Connect(function(plr)
print("if")
if Newfolder:FindFirstChild("Coins") then
print("What")
else
print("No Coins Value Found")
end
end)
Thanks!

7 comments
Is Crowns a name of a player?
The folder called ''Crowns'' does not exist
So, why do you have Crowns folder in Players Service?
Also, please clarify that the Folder named, 'Crowns' and 'Coins' value exist in the game at the location where you directing the script to
Newfolderdoes not exist, you can try using WaitForChild or make sure theCrownsfolder has been created.ah yes, sorry i just tryped crowns there and i did not realise
j just to clarify i rewrote my whole script and i did not notice but i wrote "Crowns" but i was supposed to write "Coins" but even if i correct the code and i try it in a new fresh game it still does not work and it still errors the same error ServerScriptService.Script:6: attempt to index nil with 'FindFirstChild'