Im trying to make a shopgui, and the weapon name will be a string value! But the issue is, I cant find the string value, I've make a print and it print no thing, just print a " ". I've test in playergui and the value of the string name is right, but the output doesnt, can anyone help me pls? Im new to coding!

game.ReplicatedStorage.onClickBuy.OnServerEvent:Connect(function(plr)
	if plr.leaderstats.Gold.Value >= game.StarterGui.ShopGui.Frame.MainFrame.WeaponStats.Price.Value then
		print(tostring(plr.PlayerGui.ShopGui.Frame.MainFrame.WeaponStats.WeaponValue.Value))
		if not plr.OwnsWeapon:FindFirstChild(tostring(plr.PlayerGui.ShopGui.Frame.MainFrame.WeaponStats.WeaponValue.Value)) then
		    local purchasedWeapon = Instance.new("BoolValue", plr.OwnsWeapon)
		    purchasedWeapon.Name = tostring(plr.PlayerGui.ShopGui.Frame.MainFrame.WeaponStats.WeaponValue.Value)
		    plr.PlayerGui.ShopGui.Frame.MainFrame.WeaponStats.Button.TextLabel.Text = "Equip"
		else
			    plr.PlayerGui.ShopGui.Frame.MainFrame.WeaponStats.Button.TextLabel.Text = "Equipped"
			    plr.PlayerGui.ShopGui.Frame.MainFrame.WeaponStats.Button.BackgroundColor3 = Color3.fromRGB(0,89,65)
				print("Purchase Failed!")
		end
	end
end)