Index to nil with findfirstchild

Ok so im trying do do somthing when the player joins but it is saying an error
Line 10

local rp = game:GetService("ReplicatedStorage")
local plr = game:GetService("Players")
local re = game.ReplicatedStorage.OnJoin.Normalax
local rr = game.ReplicatedStorage.OnJoin.Diamondaxe

plr.PlayerAdded:Connect(function(player: Player)
	local axes = player:FindFirstChild("axes")  -- I'm assuming this is some folder in player 
	if not axes then player:Kick("Data could not load, please rejoin.") end 

	local normalAxe = axes:FindFirstChild("Normalaxe")
	
	if not normalAxe then return end

	if not normalAxe.Value then
		re:FireClient(player)
		print("100")
	end	
end)                     

Index nil errors are caused when the thing you are trying to find is not there.

Is the “normalaxe” inside the folder?

yes it is, and i tried waitforchild, missed typed


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.