Attempt to index nil with “WeaponName”

I don’t know why,but I’ve already tried fixing this problem several times,I’ve already tried using other sources or rewriting the entire script,but sadly none of this worked.(I am in fact,using the utmm kit 2.1)So now I hope you will help me.The line with the error is script.Parent.Inventory.UsedWeapon.Text = "Used weapon: "…game.Lighting.Weapons:FindFirstChild(game.Players.LocalPlayer.Weapon.Value).WeaponName.Value

repeat wait(.05) until game.Players.LocalPlayer:FindFirstChild("_loadeddata")

local Fonts = {"Antique","Arcade","Arial","ArialBold","Bodoni","Cartoon","Code","Fantasy","Garamond","Highway","Legacy","SciFi","SourceSans","SourceSansBold","SourceSansItalic","SourceSansLight","SourceSansSemibold","Gotham","GothamBlack","GothamBold","GothamSemibold"}  
script.Parent.EditSpeech.Fonts.CanvasSize = UDim2.new(0,0,0,50*#Fonts) 
for i=1,#Fonts do
	local b = Instance.new("TextButton")
	b.Font = Fonts[i]
	b.Text = Fonts[i]
	b.Name = Fonts[i]
	b.TextColor3 = Color3.new(1,1,1)
	b.Size = UDim2.new(1,0,0,50)
	b.BackgroundColor3 = Color3.new(0,0,0)
	b.BorderColor3 = Color3.new(1,1,1)
	b.BorderSizePixel = 3
	b.ZIndex = 2
	b.TextScaled = true
	b.Parent = script.Parent.EditSpeech.Fonts
	b.MouseButton1Click:Connect(function()
		script.Parent.EditSpeech.Fonts.Visible = false
		script.Parent.EditSpeech.Font.Text = Fonts[i]
		script.Parent.EditSpeech.Font.Font = Fonts[i]
	end)
end


script.Parent.EditSpeech.Font.MouseButton1Click:Connect(function()
	script.Parent.EditSpeech.Fonts.Visible = not script.Parent.EditSpeech.Fonts.Visible 
end)


function CountersAction(visible)
	local c = workspace.DamageCounters:GetChildren()
	for i=1,#c do
		c[i].Enabled = visible
	end
end
workspace.DamageCounters.ChildAdded:Connect(function()
	CountersAction(not game.Players.LocalPlayer.DamageCounterDisabled.Value)
end)

script.Parent.EditSpeech.Font.Text = game.Players.LocalPlayer.Font.Value
script.Parent.EditSpeech.AudioId.Text = game.Players.LocalPlayer.Voice.Value
script.Parent.Inventory.Settings.Speech.MouseButton1Click:Connect(function()
	script.Parent.EditSpeech.Visible = true
end)
script.Parent.EditSpeech.Save.MouseButton1Click:Connect(function()
	script.Parent.EditSpeech.Visible = false
	local color = Color3.new(0,0,0)
	if tonumber(script.Parent.EditSpeech.Red.Text) == nil then
		color = Color3.new(1,color.g,color.b)
	end	
	if tonumber(script.Parent.EditSpeech.Green.Text) == nil then
		color = Color3.new(color.r,1,color.b)
	end
	if tonumber(script.Parent.EditSpeech.Blue.Text) == nil then
		color = Color3.new(color.r,color.g,1)
	end
	if tonumber(script.Parent.EditSpeech.Red.Text) ~= nil and tonumber(script.Parent.EditSpeech.Red.Text) > 255 then
		color = Color3.new(1,color.g,color.b)
	end
	if tonumber(script.Parent.EditSpeech.Green.Text) ~= nil and tonumber(script.Parent.EditSpeech.Green.Text) > 255 then
		color = Color3.new(color.r,1,color.b)
	end	
	if tonumber(script.Parent.EditSpeech.Blue.Text) ~= nil and tonumber(script.Parent.EditSpeech.Blue.Text) > 255 then
		color = Color3.new(color.r,color.g,1)
	end	
	if tonumber(script.Parent.EditSpeech.Red.Text) ~= nil and tonumber(script.Parent.EditSpeech.Red.Text) < 0 then
		color = Color3.new(0,color.g,color.b)
	end
	if tonumber(script.Parent.EditSpeech.Green.Text) ~= nil and tonumber(script.Parent.EditSpeech.Green.Text) < 0 then
		color = Color3.new(color.r,0,color.b)
	end
	if tonumber(script.Parent.EditSpeech.Blue.Text) ~= nil and tonumber(script.Parent.EditSpeech.Blue.Text) < 0 then
		color = Color3.new(color.r,color.g,0)
	end
	if tonumber(script.Parent.EditSpeech.Red.Text) ~= nil and tonumber(script.Parent.EditSpeech.Red.Text) >= 0 and tonumber(script.Parent.EditSpeech.Red.Text) <= 255 then
		color = Color3.new(tonumber(script.Parent.EditSpeech.Red.Text)/255,color.g,color.b)
	end
	if tonumber(script.Parent.EditSpeech.Green.Text) ~= nil and tonumber(script.Parent.EditSpeech.Green.Text) >= 0 and tonumber(script.Parent.EditSpeech.Green.Text) <= 255 then
		color = Color3.new(color.r,tonumber(script.Parent.EditSpeech.Green.Text)/255,color.b)
	end
	if tonumber(script.Parent.EditSpeech.Blue.Text) ~= nil and tonumber(script.Parent.EditSpeech.Blue.Text) >= 0 and tonumber(script.Parent.EditSpeech.Blue.Text) <= 255 then
		color = Color3.new(color.r,color.g,tonumber(script.Parent.EditSpeech.Blue.Text)/255)
	end
	print(tostring(color))
	game.Lighting.SpeechEdit:FireServer(script.Parent.EditSpeech.AudioId.Text,script.Parent.EditSpeech.Font.Text,color)
end)
script.Parent.Inventory.Settings.Speech.Visible = game:GetService("MarketplaceService"):UserOwnsGamePassAsync(game.Players.LocalPlayer.UserId,5236753) == true
if game.Players.LocalPlayer.ArmorDesignDisabled.Value == true then
	script.Parent.Inventory.Settings.ToggleArmorDesign.Text = "Enable Armor Design"
else
	script.Parent.Inventory.Settings.ToggleArmorDesign.Text = "Disable Armor Design"
end
if game.Players.LocalPlayer.CapNumbers.Value == true then
	script.Parent.Inventory.Settings.ToggleCap.Text = "Disable Number Cap"
else
	script.Parent.Inventory.Settings.ToggleCap.Text = "Enable Number Cap"
end
if game.Players.LocalPlayer.InvitationsDisabled.Value == true then
	script.Parent.Inventory.Settings.ToggleInvitation.Text = "Enable Battle Invitations"
else
	script.Parent.Inventory.Settings.ToggleInvitation.Text = "Disable Battle Invitations"
end
if game.Players.LocalPlayer.DamageCounterDisabled.Value == true then
	script.Parent.Inventory.Settings.ToggleDamageCounter.Text = "Enable Damage Counter"
	CountersAction(false)
else
	script.Parent.Inventory.Settings.ToggleDamageCounter.Text = "Disable Damage Counter"
	CountersAction(true)
end
print("despacito")
script.Parent.Inventory.Settings.ToggleInvitation.MouseButton1Click:connect(function()
	game.Lighting.ToggleInv:FireServer()
end)
script.Parent.Inventory.Settings.ToggleDamageCounter.MouseButton1Click:Connect(function()
	game.Lighting.ToggleDamageCounter:FireServer()
end)
script.Parent.Inventory.Settings.ToggleArmorDesign.MouseButton1Click:Connect(function()
	game.Lighting.ArmorDesign:FireServer()
end)
script.Parent.Inventory.Settings.ToggleCap.MouseButton1Click:Connect(function()
	game.Lighting.ToggleCap:FireServer()
end)
script.Parent.Inventory.Settings.ToggleBoost.MouseButton1Click:Connect(function()
	game.Players.LocalPlayer.PlayerGui.CustomGui.DamageBoostVisible.Value = not game.Players.LocalPlayer.PlayerGui.CustomGui.DamageBoostVisible.Value 
end)

script.Parent.Inventory.Settings.BuyKromer.MouseButton1Click:Connect(function()
	game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, 1920991514)
end)
script.Parent.Inventory.Settings.BuyKromer1.MouseButton1Click:Connect(function()
	game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, 1920991863)
end)
script.Parent.Inventory.Settings.BuyKromer2.MouseButton1Click:Connect(function()
	game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, 1921000499)
end)
script.Parent.Inventory.Settings.BuyKromer3.MouseButton1Click:Connect(function()
	game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, 1921001304)
end)
script.Parent.Inventory.Settings.BuyKromer4.MouseButton1Click:Connect(function()
	game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, 1921002708)
end)
script.Parent.Inventory.Settings.BuyKromer5.MouseButton1Click:Connect(function()
	game:GetService("MarketplaceService"):PromptProductPurchase(game.Players.LocalPlayer, 1921105625)
end)
game.Players.LocalPlayer.InvitationsDisabled.Changed:Connect(function()
	if game.Players.LocalPlayer.InvitationsDisabled.Value == true then
		script.Parent.Inventory.Settings.ToggleInvitation.Text = "Enable Battle Invitations"
		CountersAction(false)
	else
		script.Parent.Inventory.Settings.ToggleInvitation.Text = "Disable Battle Invitations"
		CountersAction(true)
	end
end)
game.Players.LocalPlayer.ArmorDesignDisabled.Changed:Connect(function()
	if game.Players.LocalPlayer.ArmorDesignDisabled.Value == true then
		script.Parent.Inventory.Settings.ToggleArmorDesign.Text = "Enable Armor Design"
	else
		script.Parent.Inventory.Settings.ToggleArmorDesign.Text = "Disable Armor Design"
	end
end)
game.Players.LocalPlayer.CapNumbers.Changed:Connect(function()
	if game.Players.LocalPlayer.CapNumbers.Value == true then
		script.Parent.Inventory.Settings.ToggleCap.Text = "Disable Number Cap"
	else
		script.Parent.Inventory.Settings.ToggleCap.Text = "Enable Number Cap"
	end
end)

game.Players.LocalPlayer.DamageCounterDisabled.Changed:Connect(function()
	if game.Players.LocalPlayer.DamageCounterDisabled.Value == true then
		script.Parent.Inventory.Settings.ToggleDamageCounter.Text = "Enable Damage Counter"
	else
		script.Parent.Inventory.Settings.ToggleDamageCounter.Text = "Disable Damage Counter"
	end
end)


game.Players.LocalPlayer.PlayerGui.CustomGui.DamageBoostVisible.Changed:Connect(function()
	if game.Players.LocalPlayer.PlayerGui.CustomGui.DamageBoostVisible.Value == true then
		script.Parent.Inventory.Settings.ToggleBoost.Text = "Disable Damage Boost Counter"
	else
		script.Parent.Inventory.Settings.ToggleBoost.Text = "Enable Damage Boost Counter"
	end
end)




function Listify()
	script.ReW:Fire()
	script.Parent.Inventory.Weapons:ClearAllChildren()
	local uilist = Instance.new("UIListLayout")
	uilist.Parent = script.Parent.Inventory.Weapons
	local c = game.Players.LocalPlayer.Weapons:GetChildren()
	script.Parent.Inventory.Weapons.CanvasSize = UDim2.new(0,0,0,0)
	for i=1,#c do
		if c[i].Value == true and script.Parent.Inventory.Weapons:FindFirstChild(c[i].Name) == nil then
			script.Parent.Inventory.Weapons.CanvasSize = script.Parent.Inventory.Weapons.CanvasSize + UDim2.new(0,0,0,50)
			local button = Instance.new("TextButton")
			local gra = script.Parent.Base:Clone()
			gra.Parent = button
			button.BackgroundColor3 = Color3.new(0,0,0)
			button.BorderSizePixel = 5
			button.Name = c[i].Name
			button.Size = UDim2.new(0.25,0,0,50)
			button.BorderColor3 = Color3.new(1,1,1)
			button.Font = Enum.Font.Arcade
			button.TextColor3 = Color3.new(1,1,1)
			button.TextScaled = true
			button.TextWrapped = true
			button.Text = game.Lighting.Weapons:FindFirstChild(c[i].Name).WeaponName.Value
			button.Parent = script.Parent.Inventory.Weapons
			local function Select()
				script.Parent.Inventory.Skins:ClearAllChildren()
				local uilist = Instance.new("UIListLayout")
				uilist.FillDirection = Enum.FillDirection.Horizontal
				uilist.Parent = script.Parent.Inventory.Skins
				script.Parent.Inventory.Skins.CanvasSize = UDim2.new(0,0,0,0)
				local s = game.Lighting.Skins:GetChildren()
				local w = game.Lighting.Weapons:GetChildren()
				for i2=1,#w do
					table.insert(s,w[i2])
				end
				for i2=1,#s do
					--print("Detected Skin",s[i2].Name,s[i2].Parent.Name,s[i2].Parent == game.Lighting.Weapons,s[i2] == game.Lighting.Weapons:FindFirstChild(c[i].Name))
					if (s[i2].Parent == game.Lighting.Skins and s[i2].SkinOf.Value == game.Lighting.Weapons:FindFirstChild(c[i].Name) and game.Players.LocalPlayer.Skins:FindFirstChild(s[i2].Name).Value == true) or (s[i2].Parent == game.Lighting.Weapons and s[i2] == game.Lighting.Weapons:FindFirstChild(c[i].Name) ) then
						local SkinButton = Instance.new("ImageButton")
						SkinButton.Name = s[i2].Name
						SkinButton.Image = s[i2].Tool:FindFirstChildOfClass("Tool").TextureId
						SkinButton.Size = UDim2.new(0,100,1,0)
						SkinButton.BorderSizePixel = 5
						SkinButton.BackgroundColor3 = Color3.new(0,0,0)
						if c[i].Skin.Value == s[i2] then
							SkinButton.BorderColor3 = Color3.new(1,1,0)
						else
							SkinButton.BorderColor3 = Color3.new(1,1,1)
						end
						local Name = Instance.new("TextLabel")
						Name.Text = s[i2].WeaponName.Value
						Name.Font = Enum.Font.Arcade
						Name.BackgroundTransparency = 1
						Name.TextScaled = true
						Name.Name = "SkinName"
						if s[i2].Parent == game.Lighting.Skins then
							Name.TextColor3 = s[i2].Rarity.Value.RarityColor.Value
						else
							Name.TextColor3 = Color3.new(1,1,1)
						end
						Name.Size = UDim2.new(1,0,0.5,0)
						Name.Position = UDim2.new(0,0,.5,0)
						Name.Parent = SkinButton
						SkinButton.Parent = script.Parent.Inventory.Skins
						print("Skin",s[i2].Name)
						SkinButton.MouseButton1Click:Connect(function()
							if c[i].Value == true then
								game.Lighting.EquipSkin:FireServer(s[i2])
								wait(.25)
								Select()
							end
						end)
					end
				end
				if c[i].Skin.Value.Parent == game.Lighting.Skins then
					script.Parent.Inventory.Rarity.Text = c[i].Skin.Value.Rarity.Value.RarityName.Value
					script.Parent.Inventory.Rarity.TextColor3 = c[i].Skin.Value.Rarity.Value.RarityColor.Value
					script.Parent.Inventory.Rarity.Visible = true
				else
					script.Parent.Inventory.Rarity.Visible = false
				end
				script.Parent.Inventory.Perm.Visible = game.Lighting.Weapons:FindFirstChild(c[i].Name).Permanent.Value == true or game.Lighting.Weapons:FindFirstChild(c[i].Name).TruePermanent.Value == true
				if game.Lighting.Weapons:FindFirstChild(c[i].Name).TruePermanent.Value == true then
					script.Parent.Inventory.Perm.Text = "True Permanent"
					script.Parent.Inventory.Perm.TextColor3 = Color3.fromRGB(155,0,255)
				else
					script.Parent.Inventory.Perm.TextColor3 = Color3.new(1,1,0)	
				end
				script.Parent.Inventory.Image.ImageColor3 = Color3.new(1,1,1)
				script.Parent.Inventory.Image.Image = c[i].Skin.Value.Tool:FindFirstChild("AttackTool").TextureId
				script.Parent.Inventory.ItemName.Text = c[i].Skin.Value.WeaponName.Value
				script.Parent.Inventory.Description.Text = c[i].Skin.Value.Description.Value
				if game.Lighting.Weapons:FindFirstChild(c[i].Name).Tool:FindFirstChildOfClass("Tool"):FindFirstChild("Damage") then
					script.Parent.Inventory.Stat.Text = "Damage: "..tostring(c[i].Skin.Value.Tool:FindFirstChildOfClass("Tool"):FindFirstChild("Damage").Value+(c[i].Skin.Value.Tool:FindFirstChildOfClass("Tool"):FindFirstChild("DamageModify").Value*(game.Players.LocalPlayer.LOVE.Value-1))).." (at your LV)"
				else
					script.Parent.Inventory.Stat.Text = ""
				end
			end
			button.MouseEnter:Connect(Select)
			button.SelectionGained:Connect(Select)
			button.MouseButton1Click:connect(function()
				if c[i].Value == true then
					game.Lighting.LoadChar:FireServer()
					game.Lighting.UseWeapon:FireServer(game.Lighting.Weapons:FindFirstChild(c[i].Name))
				end
			end)
		end
	end
	script.ReW.Event:Connect(function()
		return
	end)
end
local c = game.Players.LocalPlayer.Weapons:GetChildren()
for i=1,#c do
	c[i].Changed:Connect(Listify)
end
Listify()

script.Parent.Inventory.UsedWeapon.Text = "Used weapon: "..game.Lighting.Weapons:FindFirstChild(game.Players.LocalPlayer.Weapon.Value).WeaponName.Value
game.Players.LocalPlayer.Weapon.Changed:Connect(function()
	script.Parent.Inventory.UsedWeapon.Text = "Used weapon: "..game.Lighting.Weapons:FindFirstChild(game.Players.LocalPlayer.Weapon.Value).WeaponName.Value
end)
local OpenCD = false
script.Parent.ActivateIt.MouseButton1Click:Connect(function()
	if OpenCD == false then
		if script.Parent.Inventory.Visible == true then
			OpenCD = true
			game.TweenService:Create(script.Parent.Inventory, TweenInfo.new(1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut),{Size = UDim2.new(0, 0, 0, 0),Position = UDim2.new(0.5, 0,-1, 0)}):Play()
			wait(1.1)
			OpenCD = false
			script.Parent.Inventory.Visible = false
		elseif script.Parent.Inventory.Visible == false then
			OpenCD = true
			script.Parent.Inventory.Visible = true
			game.TweenService:Create(script.Parent.Inventory, TweenInfo.new(1, Enum.EasingStyle.Quad, Enum.EasingDirection.InOut),{Size = UDim2.new(0.8, 0, 0.6, 0),Position = UDim2.new(0.16, 0, 0.3, 0)}):Play()
			wait(1.1)
			OpenCD = false
		end
	end
end)
---

script.Parent.Inventory.Weapon.MouseButton1Click:connect(function()
	script.Parent.Inventory.Weapons.Visible = true
	script.Parent.Inventory.Food.Visible = false
	script.Parent.Inventory.UsedWeapon.Visible = true
	script.Parent.Inventory.FoodTip.Visible = false
	script.Parent.Inventory.SOUL.Visible = false
	script.Parent.Inventory.UsedSOUL.Visible = false
	script.Parent.Inventory.Settings.Visible = false
	script.Parent.Inventory.Armor.Visible = false
	script.Parent.Inventory.BossChart.Visible = false
	script.Parent.Inventory.BossChartStats.Visible = false
	script.Parent.Inventory.UsedArmor.Visible = false
	script.Parent.Inventory.ItemName.Visible = true
	script.Parent.Inventory.Perm.Visible = true
	script.Parent.Inventory.Description.Visible = true
	script.Parent.Inventory.Image.Visible = true
	script.Parent.Inventory.Stat.Visible = true
	script.Parent.Inventory.Skins.Visible = true
	script.Parent.Inventory.Frame2.Visible = true
end)
script.Parent.Inventory.Foods.MouseButton1Click:connect(function()
	script.Parent.Inventory.Food.Visible = true
	script.Parent.Inventory.Weapons.Visible = false
	script.Parent.Inventory.FoodTip.Visible = true
	script.Parent.Inventory.UsedWeapon.Visible = false
	script.Parent.Inventory.SOUL.Visible = false
	script.Parent.Inventory.UsedSOUL.Visible = false
	script.Parent.Inventory.Settings.Visible = false
	script.Parent.Inventory.Armor.Visible = false
	script.Parent.Inventory.BossChart.Visible = false
	script.Parent.Inventory.BossChartStats.Visible = false
	script.Parent.Inventory.UsedArmor.Visible = false
	script.Parent.Inventory.ItemName.Visible = true
	script.Parent.Inventory.Perm.Visible = true
	script.Parent.Inventory.Description.Visible = true
	script.Parent.Inventory.Image.Visible = true
	script.Parent.Inventory.Stat.Visible = true
	script.Parent.Inventory.Skins.Visible = false
	script.Parent.Inventory.Frame2.Visible = true
end)
script.Parent.Inventory.Souls.MouseButton1Click:connect(function()
	script.Parent.Inventory.Food.Visible = false
	script.Parent.Inventory.Weapons.Visible = false
	script.Parent.Inventory.FoodTip.Visible = false
	script.Parent.Inventory.UsedWeapon.Visible = false
	script.Parent.Inventory.SOUL.Visible = true
	script.Parent.Inventory.UsedSOUL.Visible = true
	script.Parent.Inventory.Settings.Visible = false
	script.Parent.Inventory.Armor.Visible = false
	script.Parent.Inventory.BossChart.Visible = false
	script.Parent.Inventory.BossChartStats.Visible = false
	script.Parent.Inventory.UsedArmor.Visible = false
	script.Parent.Inventory.ItemName.Visible = true
	script.Parent.Inventory.Perm.Visible = true
	script.Parent.Inventory.Description.Visible = true
	script.Parent.Inventory.Image.Visible = true
	script.Parent.Inventory.Stat.Visible = true
	script.Parent.Inventory.Skins.Visible = false
	script.Parent.Inventory.Frame2.Visible = true
end)
script.Parent.Inventory.SettingsB.MouseButton1Click:connect(function()
	script.Parent.Inventory.Food.Visible = false
	script.Parent.Inventory.Weapons.Visible = false
	script.Parent.Inventory.FoodTip.Visible = false
	script.Parent.Inventory.UsedWeapon.Visible = false
	script.Parent.Inventory.SOUL.Visible = false
	script.Parent.Inventory.UsedSOUL.Visible = false
	script.Parent.Inventory.Settings.Visible = true
	script.Parent.Inventory.BossChart.Visible = false
	script.Parent.Inventory.BossChartStats.Visible = false
	script.Parent.Inventory.Armor.Visible = false
	script.Parent.Inventory.UsedArmor.Visible = false
	script.Parent.Inventory.ItemName.Visible = false
	script.Parent.Inventory.Perm.Visible = false
	script.Parent.Inventory.Description.Visible = false
	script.Parent.Inventory.Image.Visible = false
	script.Parent.Inventory.Stat.Visible = false
	script.Parent.Inventory.Skins.Visible = false
	script.Parent.Inventory.Frame2.Visible = false
end)
script.Parent.Inventory.Armors.MouseButton1Click:Connect(function()
	script.Parent.Inventory.Food.Visible = false
	script.Parent.Inventory.Weapons.Visible = false
	script.Parent.Inventory.FoodTip.Visible = false
	script.Parent.Inventory.UsedWeapon.Visible = false
	script.Parent.Inventory.SOUL.Visible = false
	script.Parent.Inventory.UsedSOUL.Visible = false
	script.Parent.Inventory.Settings.Visible = false
	script.Parent.Inventory.Armor.Visible = true
	script.Parent.Inventory.UsedArmor.Visible = true
	script.Parent.Inventory.ItemName.Visible = true
	script.Parent.Inventory.Perm.Visible = true
	script.Parent.Inventory.Description.Visible = true
	script.Parent.Inventory.Image.Visible = true
	script.Parent.Inventory.Stat.Visible = true
	script.Parent.Inventory.Skins.Visible = false
	script.Parent.Inventory.Frame2.Visible = true
end)
script.Parent.Inventory.BossChartB.MouseButton1Click:Connect(function()
	script.Parent.Inventory.Food.Visible = false
	script.Parent.Inventory.Weapons.Visible = false
	script.Parent.Inventory.FoodTip.Visible = false
	script.Parent.Inventory.UsedWeapon.Visible = false
	script.Parent.Inventory.SOUL.Visible = false
	script.Parent.Inventory.UsedSOUL.Visible = false
	script.Parent.Inventory.Settings.Visible = false
	script.Parent.Inventory.Armor.Visible = false
	script.Parent.Inventory.UsedArmor.Visible = false
	script.Parent.Inventory.BossChart.Visible = true
	script.Parent.Inventory.BossChartStats.Visible = true
	script.Parent.Inventory.ItemName.Visible = false
	script.Parent.Inventory.Perm.Visible = false
	script.Parent.Inventory.Description.Visible = false
	script.Parent.Inventory.Image.Visible = false
	script.Parent.Inventory.Stat.Visible = false
	script.Parent.Inventory.Skins.Visible = false
	script.Parent.Inventory.Frame2.Visible = false
end)

function ListifyINV()
	script.ReF:Fire()
	script.Parent.Inventory.Food:ClearAllChildren()
	local layout = Instance.new("UIListLayout")
	layout.Parent = script.Parent.Inventory.Food
	local c = game.Players.LocalPlayer.Food:GetChildren()
	script.Parent.Inventory.Food.CanvasSize = UDim2.new(0,0,0,0)
	for i=1,#c do
		if c[i].Value > 0 then
			script.Parent.Inventory.Food.CanvasSize = script.Parent.Inventory.Food.CanvasSize + UDim2.new(0,0,0,50)

			local button = Instance.new("TextButton")
			local gra = script.Parent.Base:Clone()
			gra.Parent = button
			button.BackgroundColor3 = Color3.new(0,0,0)
			button.BorderSizePixel = 5
			button.Name = c[i].Name
			button.Size = UDim2.new(0.25,0,0,50)
			button.BorderColor3 = Color3.new(1,1,1)
			button.Font = Enum.Font.Arcade
			button.TextColor3 = Color3.new(1,1,1)
			button.TextScaled = true
			button.TextWrapped = true
			button.Text = game.Lighting.Food:FindFirstChild(c[i].Name).FoodName.Value..": "..c[i].Value
			button.Parent = script.Parent.Inventory.Food
			local function Select()
				script.Parent.Inventory.Perm.Visible = false
				script.Parent.Inventory.Image.ImageColor3 = Color3.new(1,1,1)
				script.Parent.Inventory.Image.Image = game.Lighting.Food:FindFirstChild(c[i].Name).Tool:FindFirstChildOfClass("Tool").TextureId
				script.Parent.Inventory.ItemName.Text = game.Lighting.Food:FindFirstChild(c[i].Name).FoodName.Value
				script.Parent.Inventory.Description.Text = game.Lighting.Food:FindFirstChild(c[i].Name).Description.Value
				script.Parent.Inventory.Rarity.Visible = false
				if game.Lighting.Food:FindFirstChild(c[i].Name).Tool:FindFirstChildOfClass("Tool"):FindFirstChild("Heal") then
					script.Parent.Inventory.Stat.Text = "Heals: "..tostring(game.Lighting.Food:FindFirstChild(c[i].Name).Tool:FindFirstChildOfClass("Tool"):FindFirstChild("Heal").Value).." HP"
				else
					script.Parent.Inventory.Stat.Text = ""
				end
				script.Parent.Inventory.Perm.Visible = game.Lighting.Food:FindFirstChild(c[i].Name).Permanent.Value == true or game.Lighting.Food:FindFirstChild(c[i].Name).TruePermanent.Value == true
				if game.Lighting.Food:FindFirstChild(c[i].Name).TruePermanent.Value == true then
					script.Parent.Inventory.Perm.Text = "True Permanent"
					script.Parent.Inventory.Perm.TextColor3 = Color3.fromRGB(155,0,255)
				else
					script.Parent.Inventory.Perm.TextColor3 = Color3.new(1,1,0)	
				end
			end
			button.MouseEnter:Connect(Select)
			button.SelectionGained:Connect(Select)
			button.MouseButton1Click:connect(function()
				if game.Lighting.Food:FindFirstChild(c[i].Name).Permanent.Value == false then
					game.Lighting.Sell:FireServer(game.Lighting.Food:FindFirstChild(c[i].Name))
					script.Parent.Sound:Play()
				end
			end)
		end
		script.ReF.Event:Connect(function()
			return
		end)
	end
end
ListifyINV()
local c = game.Players.LocalPlayer.Food:GetChildren()
for i=1,#c do
	c[i].Changed:Connect(ListifyINV)
end
---

function ListifySOUL()
	script.ReS:Fire()
	script.Parent.Inventory.SOUL:ClearAllChildren()
	local uilist = Instance.new("UIListLayout")
	uilist.Parent = script.Parent.Inventory.SOUL

	local c = game.Players.LocalPlayer.SOULs:GetChildren()
	script.Parent.Inventory.SOUL.CanvasSize = UDim2.new(0,0,0,0)
	for i=1,#c do
		if c[i].Value == true and script.Parent.Inventory.SOUL:FindFirstChild(c[i].Name) == nil then
			script.Parent.Inventory.SOUL.CanvasSize = script.Parent.Inventory.SOUL.CanvasSize + UDim2.new(0,0,0,50)
			local button = Instance.new("TextButton")
			local gra = script.Parent.Base:Clone()
			gra.Parent = button
			button.BackgroundColor3 = Color3.new(0,0,0)
			button.BorderSizePixel = 5
			button.Name = c[i].Name
			button.Size = UDim2.new(0.25,0,0,50)
			button.BorderColor3 = Color3.new(1,1,1)
			button.Font = Enum.Font.Arcade
			button.TextColor3 = Color3.new(1,1,1)
			button.TextScaled = true
			button.TextWrapped = true
			button.Text = game.Lighting.SOULs:FindFirstChild(c[i].Name).SoulName.Value
			button.Parent = script.Parent.Inventory.SOUL
			local function Select()
				script.Parent.Inventory.Perm.Visible = game.Lighting.SOULs:FindFirstChild(c[i].Name).Permanent.Value == true or game.Lighting.SOULs:FindFirstChild(c[i].Name).TruePermanent.Value == true
				if game.Lighting.SOULs:FindFirstChild(c[i].Name).TruePermanent.Value == true then
					script.Parent.Inventory.Perm.Text = "True Permanent"
					script.Parent.Inventory.Perm.TextColor3 = Color3.fromRGB(155,0,255)
				else
					script.Parent.Inventory.Perm.TextColor3 = Color3.new(1,1,0)	
				end
				script.Parent.Inventory.Image.Image = "rbxassetid://2098055065"
				script.Parent.Inventory.ItemName.Text = game.Lighting.SOULs:FindFirstChild(c[i].Name).SoulName.Value
				script.Parent.Inventory.Description.Text = game.Lighting.SOULs:FindFirstChild(c[i].Name).Description.Value
				script.Parent.Inventory.Stat.Text = ""
		--[[	if c[i].EnchantSOUL.Value then
				local s = c[i].Enchantments:GetChildren()
				for i2=1,#s do
					local SoulButton = Instance.new("ImageButton")
					SoulButton.Name = s[i2].Name
					SoulButton.Image = s[i2].Tool:FindFirstChildOfClass("Tool").TextureId
					SoulButton.Size = UDim2.new(0,100,1,0)
					SoulButton.BorderSizePixel = 5
					SoulButton.BackgroundColor3 = Color3.new(0,0,0)
					if c[i].Skin.Value == s[i2] then
						SoulButton.BorderColor3 = Color3.new(1,1,0)
					else
						SoulButton.BorderColor3 = Color3.new(1,1,1)
					end
					local Name = Instance.new("TextLabel")
					Name.Text = s[i2].WeaponName.Value
					Name.Font = Enum.Font.Arcade
					Name.BackgroundTransparency = 1
					Name.TextScaled = true
					Name.Name = "SkinName"
					if s[i2].Parent == game.Lighting.Skins then
						Name.TextColor3 = s[i2].Rarity.Value.RarityColor.Value
					else
						Name.TextColor3 = Color3.new(1,1,1)
					end
					Name.Size = UDim2.new(1,0,0.5,0)
					Name.Position = UDim2.new(0,0,.5,0)
					Name.Parent = SoulButton
					SoulButton.Parent = script.Parent.Inventory.Skins
					print("Skin",s[i2].Name)
					SoulButton.MouseButton1Click:Connect(function()
						if c[i].Value == true then
						game.Lighting.EquipSkin:FireServer(s[i2])
						wait(.25)
						Select()
						end
					end)
				end
			end]]
				if c[i]:FindFirstChild("CustomImage") == nil then
					script.Parent.Inventory.Image.ImageColor3 = game.Lighting.SOULs:FindFirstChild(c[i].Name).Color.Value
				else
					script.Parent.Inventory.Image:Destroy()
					local img = c[i].CustomImage:Clone()
					img.Name = "Image"
					img.Parent = script.Parent.Inventory
				end
				script.Parent.Inventory.Rarity.Visible = false
			end
			button.MouseEnter:Connect(Select)
			button.SelectionGained:Connect(Select)
			button.MouseButton1Click:connect(function()
				game.Lighting.LoadChar:FireServer()
				game.Lighting.UseSoul:FireServer(game.Lighting.SOULs:FindFirstChild(c[i].Name))
			end)
		end
		script.ReS.Event:Connect(function()
			return
		end)
	end
end
ListifySOUL()
local c = game.Players.LocalPlayer.SOULs:GetChildren()
for i=1,#c do
	c[i].Changed:Connect(ListifySOUL)
end
script.Parent.Inventory.UsedArmor.Text = "Used Armor: "..game.Lighting.Armor:FindFirstChild(game.Players.LocalPlayer.EquippedArmor.Value.Name).ArmorName.Value
game.Players.LocalPlayer.EquippedArmor.Changed:connect(function()
	script.Parent.Inventory.UsedArmor.Text = "Used Armor: "..game.Lighting.Armor:FindFirstChild(game.Players.LocalPlayer.EquippedArmor.Value.Name).ArmorName.Value
end)
script.Parent.Inventory.UsedSOUL.Text = "Used SOUL: "..game.Lighting.SOULs:FindFirstChild(game.Players.LocalPlayer.SelectedSOUL.Value.Name).SoulName.Value
game.Players.LocalPlayer.SelectedSOUL.Changed:connect(function()
	script.Parent.Inventory.UsedSOUL.Text = "Used SOUL: "..game.Lighting.SOULs:FindFirstChild(game.Players.LocalPlayer.SelectedSOUL.Value.Name).SoulName.Value
end)
function ListifyARM()
	script.ReA:Fire()
	script.Parent.Inventory.Armor:ClearAllChildren()
	local uilist = Instance.new("UIListLayout")
	uilist.Parent = script.Parent.Inventory.Armor
	local c = game.Players.LocalPlayer.Armor:GetChildren()
	script.Parent.Inventory.Armor.CanvasSize = UDim2.new(0,0,0,0)
	for i=1,#c do
		if c[i].Value == true and script.Parent.Inventory.Armor:FindFirstChild(c[i].Name) == nil then
			script.Parent.Inventory.Armor.CanvasSize = script.Parent.Inventory.Armor.CanvasSize + UDim2.new(0,0,0,50)
			local button = Instance.new("TextButton")
			local gra = script.Parent.Base:Clone()
			gra.Parent = button
			button.BackgroundColor3 = Color3.new(0,0,0)
			button.BorderSizePixel = 5
			button.Name = c[i].Name
			button.Size = UDim2.new(0.25,0,0,50)
			button.BorderColor3 = Color3.new(1,1,1)
			button.Font = Enum.Font.Arcade
			button.TextColor3 = Color3.new(1,1,1)
			button.TextScaled = true
			button.TextWrapped = true
			button.Text = game.Lighting.Armor:FindFirstChild(c[i].Name).ArmorName.Value
			button.Parent = script.Parent.Inventory.Armor
			local function Select()
				script.Parent.Inventory.Perm.Visible = game.Lighting.Armor:FindFirstChild(c[i].Name).Permanent.Value == true or game.Lighting.Armor:FindFirstChild(c[i].Name).TruePermanent.Value == true
				if game.Lighting.Armor:FindFirstChild(c[i].Name).TruePermanent.Value == true then
					script.Parent.Inventory.Perm.Text = "True Permanent"
					script.Parent.Inventory.Perm.TextColor3 = Color3.fromRGB(155,0,255)
				else
					script.Parent.Inventory.Perm.TextColor3 = Color3.new(1,1,0)	
				end
				script.Parent.Inventory.Image.ImageColor3 = Color3.new(1,1,1)
				script.Parent.Inventory.Image.Image = "rbxassetid://"..game.Lighting.Armor:FindFirstChild(c[i].Name).Icon.Value
				script.Parent.Inventory.ItemName.Text = game.Lighting.Armor:FindFirstChild(c[i].Name).ArmorName.Value
				script.Parent.Inventory.Description.Text = game.Lighting.Armor:FindFirstChild(c[i].Name).Description.Value
				script.Parent.Inventory.Stat.Text = "HP Bonus: "..tostring(game.Lighting.Armor:FindFirstChild(c[i].Name).HPBonus.Value)
				script.Parent.Inventory.Rarity.Visible = false
			end
			button.MouseEnter:Connect(Select)
			button.SelectionGained:Connect(Select)
			button.MouseButton1Click:connect(function()
				game.Lighting.LoadChar:FireServer()
				game.Lighting.EquipArmor:FireServer(game.Lighting.Armor:FindFirstChild(c[i].Name))
			end)
		end
		script.ReA.Event:Connect(function()
			return
		end)
	end
end
local c = game.Players.LocalPlayer.Armor:GetChildren()
for i=1,#c do
	c[i].Changed:Connect(ListifyARM)
end
ListifyARM()

BossChartBattle = "Frogger"

function ListifyBC()
	local success,message = pcall(function()
		script.ReB:Fire()
		script.Parent.Inventory.BossChart.CanvasSize = UDim2.new(0,0,0,0)
		script.Parent.Inventory.BossChart:ClearAllChildren()
		local uilist = Instance.new("UIListLayout")
		uilist.Parent = script.Parent.Inventory.BossChart
		local c = game.Players.LocalPlayer.BossChart:GetChildren()
		for i=1,#c do
			if game.Lighting.Battles:FindFirstChild(c[i].Name) and  (game.Lighting.Battles:FindFirstChild(c[i].Name).IgnoreUnlessFought.Value and ((c[i].TimesFought.Value > 0 or c[i].TimesFoughtMulti.Value > 0)) or game.Lighting.Battles:FindFirstChild(c[i].Name).IgnoreUnlessFought.Value == false) and (Category == "All" or Category == game.Lighting.Battles:FindFirstChild(c[i].Name).Category.Value) then
				script.Parent.Inventory.BossChart.CanvasSize = script.Parent.Inventory.BossChart.CanvasSize + UDim2.new(0,0,0,50)
				local button = Instance.new("TextButton")
				local gra = script.Parent.Base:Clone()
				gra.Parent = button
				button.BackgroundColor3 = Color3.new(0,0,0)
				button.BorderSizePixel = 5
				button.Name = c[i].Name
				button.Size = UDim2.new(0.25,0,0,50)
				button.BorderColor3 = Color3.new(1,1,1)
				button.Font = Enum.Font.Arcade
				button.TextColor3 = Color3.new(1,1,1)
				button.TextScaled = true
				button.TextWrapped = true
				button.Text = game.Lighting.Battles:FindFirstChild(c[i].Name).BattleName.Value
				button.Parent = script.Parent.Inventory.BossChart
				local function Select()
					script.Parent.Inventory.BossChartStats.SoloFought.Text = "Times Fought (Solo): "..c[i].TimesFought.Value
					script.Parent.Inventory.BossChartStats.MultiFought.Text = "Times Fought (Multi): "..c[i].TimesFoughtMulti.Value
					script.Parent.Inventory.BossChartStats.Date.Text = "Date fought (First time) (format is D/M/Y): "..c[i].Date.Value
					script.Parent.Inventory.BossChartStats.ResetsFirst.Text = "Resets (First time): "..c[i].Resets.Value 
					script.Parent.Inventory.BossChartStats.LOVEFirst.Text = "LOVE (First time): "..c[i].LOVE.Value
					script.Parent.Inventory.BossChartStats.Teleport.Visible = (game.Lighting.Battles:FindFirstChild(c[i].Name).IgnoreUnlessFought.Value == false and c[i].TimesFought.Value >= 1)
					BossChartBattle = c[i].Name
				end
				button.MouseEnter:Connect(Select)
				button.SelectionGained:Connect(Select)
				button.Parent = script.Parent.Inventory.BossChart
			end 
		end
	end)
	if success == false then
		warn("Error while listing boss chart: "..message)
	end
end
local Categories = {"All"}
Category = "All"
local c = game.Lighting.Battles:GetChildren()
for i=1,#c do
	local yesinsert = true
	for i2=1,#Categories do
		if c[i].Category.Value == Categories[i2] then
			yesinsert = false
		end
	end
	if yesinsert then
		table.insert(Categories,#Categories+1,c[i].Category.Value)
	end
end
script.Parent.Inventory.BossChartStats.CategoryList.CanvasSize = UDim2.new(0,0,0,30*#Categories)
for i=1,#Categories do
	local button = Instance.new("TextButton")
	local gra = script.Parent.Base:Clone()
	gra.Parent = button
	button.Name = Categories[i]
	button.Text = Categories[i]
	button.Size = UDim2.new(1,0,0,30)
	button.BackgroundColor3 = Color3.new(0,0,0)
	button.BorderSizePixel = 1
	button.TextColor3 = Color3.new(1,1,1)
	button.Font = Enum.Font.Arcade
	button.TextScaled = true
	button.BorderColor3 = Color3.new(1,1,1)
	button.Parent = script.Parent.Inventory.BossChartStats.CategoryList
	button.MouseButton1Click:Connect(function()
		script.Parent.Inventory.BossChartStats.CategoryList.Visible = false
		Category = Categories[i]
		script.Parent.Inventory.BossChartStats.Category.Text = "Category: "..Categories[i]
		ListifyBC()
	end)
end
script.Parent.Inventory.BossChartStats.Category.MouseButton1Click:Connect(function()
	script.Parent.Inventory.BossChartStats.CategoryList.Visible = not script.Parent.Inventory.BossChartStats.CategoryList.Visible
end)
script.Parent.Inventory.BossChartStats.Teleport.MouseButton1Click:Connect(function()
	game.Lighting.TeleportToBoss:FireServer(game.Lighting.Battles:FindFirstChild(BossChartBattle))
end)
local c = game.Players.LocalPlayer.BossChart:GetChildren()
for i=1,#c do
	c[i].Date.Changed:Connect(ListifyBC)
end


ListifyBC()
script.Parent.Inventory.UsedWeapon.Text = "Used weapon: "..game.Lighting.Weapons:FindFirstChild(game.Players.LocalPlayer.Weapon.Value).WeaponName.Value
game.Players.LocalPlayer.Weapon.Changed:connect(function()
	script.Parent.Inventory.UsedWeapon.Text = "Used weapon: "..game.Lighting.Weapons:FindFirstChild(game.Players.LocalPlayer.Weapon.Value).WeaponName.Value
end)

---
game.Players.LocalPlayer.CharacterAdded:connect(function()
	script.Parent.Enabled = true
	script.Parent.Inventory.Visible = false
end)
game.Lighting.Music.OnClientEvent:connect(function(useless,visible)
	script.Parent.Enabled = visible == true
end)















--[[]
local MaxJumpPower = 80
local MaxSpeed = 50
local logged = false
local RecognizedTools = {"AttackTool","Food","_OTHERWEAPON"} --our custom weapons will be checked on own
local RecognizedGui = {"Despacito2","Dogcheck","BubbleChat","Chat","TouchGui","HandyDandyConsole","_ATTACKSCRIPT","Freecam"} -- all the recognized guis 
local c = game.StarterGui:GetChildren()
for i=1,#c do
	table.insert(RecognizedGui,c[i].Name)
end
function CheckHumanoid()
	local hum = game.Players.LocalPlayer.Character.Humanoid
	if hum.WalkSpeed > MaxSpeed then
		game.Lighting.InfinityGauntlet:FireServer("Max Walkspeed exceeded ("..hum.WalkSpeed..")")
	end
	if hum.JumpPower > MaxJumpPower then
		game.Lighting.InfinityGauntlet:FireServer("Max Jump Power exceeded ("..hum.JumpPower..")")
	end
	if hum.Health > hum.MaxHealth or hum.Health > 20 + (4*(game.Players.LocalPlayer.LOVE.Value-1)) then
		game.Lighting.InfinityGauntlet:FireServer("Questionable HP ("..hum.Health.."/"..hum.MaxHealth..")")
	end
end
function CheckGay(gay)
	for i=1,#RecognizedGui do
		if RecognizedGui[i] == gay.Name then
			return true
		end
	end
	return false
end
function CheckTool(gay)
	for i=1,#RecognizedTools do
		if gay.Name == RecognizedTools[i] or (game.Lighting.Weapons.DoggoWeapon.Tool:FindFirstChildOfClass("Tool") and gay.Name == game.Lighting.Weapons.DoggoWeapon.Tool:FindFirstChildOfClass("Tool").Name) or (game.Lighting.Weapons.NikoWeapon.Tool:FindFirstChildOfClass("Tool") and gay.Name == game.Lighting.Weapons.NikoWeapon.Tool:FindFirstChildOfClass("Tool").Name)   then
			print("Tool")
			return true
		end
	end
	return false
end
function RecognizeTools()
	local read =  {}
	local c = game.Players.LocalPlayer.Backpack:GetChildren()
	for i=1,#c do table.insert(read,c[i]) end
	local c = game.Players.LocalPlayer.Character:GetChildren()
	for i=1,#c do if c[i]:IsA("Tool") then table.insert(read,c[i]) end end
	for i=1,#read do
		if CheckTool(read[i]) == false and logged == false then
			logged = true
			game.Lighting.InfinityGauntlet:FireServer("Unknown Tool found (name: "..read[i].Name..")")
		end
	end 
end
function RecognizeGay()
	print("gonna check guis")
	local c = game.Players.LocalPlayer.PlayerGui:GetChildren()
	for i=1,#c do
		if CheckGay(c[i]) == false and logged == false then
			if logged == false then
				game.Lighting.InfinityGauntlet:FireServer("Unknown GUI Object found (name: "..c[i].Name..", "..c[i].ClassName..")")
				logged = true
				print("NOOB EXPLOITER WHY EXPLOIT NOW YOU GET BAN >:((((")
			end   
		end
	end
end
local illegal = {game,game.ReplicatedFirst,game.ReplicatedStorage}
RecognizeGay()
RecognizeTools()
for i=1,#illegal do
	local yes,result = pcall(function()
		illegal[i].ChildAdded:Connect(function(c)
			if c:IsA("Folder") or illegal[i] ~= game then
				game.Lighting.InfinityGauntlet:FireServer("Unknown object at "..illegal[i].Name.." found (name: "..c.Name..", "..c.ClassName..")")
			end
		end)
	end)
	if yes == false then
		warn("Illegality failed: "..result)
	end
end
--[[ Disabled anti-exploits for the noobs. Enable only if you know what you're doing!
game.Players.LocalPlayer.Backpack.ChildAdded:Connect(RecognizeTools)
game.Players.LocalPlayer.Backpack.ChildRemoved:Connect(RecognizeTools)
game.Players.LocalPlayer.CharacterAdded:Connect(function(char)
char.ChildAdded:Connect(RecognizeTools)
char.ChildRemoved:Connect(RecognizeTools)
char:WaitForChild("HumanoidRootPart",3).ChildAdded:Connect(function(c)
	if c:IsA("BodyMover") and c.Name ~= "_MOVER" then
		game.Lighting.InfinityGauntlet:FireServer("Unknown body mover found (name: "..c.Name..", "..c.ClassName..")")
	end
end)
end)
game.Players.LocalPlayer:WaitForChild("PlayerGui",3).ChildAdded:Connect(RecognizeGay)
game.Players.LocalPlayer:WaitForChild("PlayerGui",3).ChildRemoved:Connect(RecognizeGay)

script.ChildAdded:Connect(function(c)
	game.Lighting.InfinityGauntlet:FireServer("Possibly game file stealer detected (name: "..c.Name..", class name: "..c.ClassName)
end)
]]
``
4 Likes

Could you provide the line number this specific error occurs in? There are multiple parts of your Script containing the line in question.

1 Like

the exact number of the line the error occurs in is 308

1 Like

Did you make sure that the Value is a StringValue that actually holds a value?

1 Like

2 Likes

Are you sure this is loading correctly?
How are you getting these values to be direct children of the player?

Also, weapon is a Bool, not a String

2 Likes

i dont really know,im just using a public utmm kit

2 Likes

Could you please send the error word for word?

And maybe the name of the asset too?

1 Like

1 Like

what do you mean,the name of the kit? or what

Ok, so Weapon is a BoolValue and you’re using it as a string, so unless one of the weapons is named “true” it’s going to throw an error.

So instead of ‘Weapon.Value’ use ‘Weapon.Name’

Hope this helps!

1 Like


it works,thanks you so much,but it still has another error,in the line 620,it is boolvalue instead of string,so removed the value thing,and it still doesnt work

Oh, no!

I looked in version 2.1 and found this line of code instead of the one you provided

script.Parent.Inventory.UsedWeapon.Text = "Used weapon: "..Player.Weapon.Value.WeaponName.Value

I may be wrong, but those errors may not be because of the code I provided (they might though). The code is now finishing allowing it to encounter new errors.

This seems like a long chain of errors. Maybe you could try a different project or just get the newest version (and turn on API)

this is the latest version provided to it,so what should i do