Basically this script is to check for the validity of the weapon in starterGui. But when I add weapon from the command bar it is not even acknowledging the existence of the weapons. Please help

local function onPlayerJoin(player)
	while wait()do
		local serverTable = game.ServerStorage.Validation
		local starterGear = player:FindFirstChild("StarterGear"):GetChildren()
		for i,v in pairs(starterGear)do
			print(v)
			local CurrentGun = v
			local recipt = CurrentGun:FindFirstChild("Value").Value
			local serverRecipt = serverTable:FindFirstChild(player.Name .. tostring(CurrentGun)):FindFirstChild("Value").Value
			if serverRecipt ~= recipt or serverRecipt == nil or recipt == nil then
				
			end
		end	
	end	
end
game.Players.PlayerAdded:Connect(onPlayerJoin)

EDIT:I was inserting in client.

1 comment

0

What do you REALLY need help with http://xyproblem.info