Not a valid member while it is

Roblox keeps giving me the error that SkinPrice is not a valid member of a certain skin while it obviously is. We are using a package to load the UnitSkin folder but that shouldnt be the issue.

Might just be me missing something very obviously but I honestly have no clue what

this is the script, its in serverscriptservice

local RS = game:GetService("ReplicatedStorage")

local Modules = RS:WaitForChild("Modules")
local Folder = RS:WaitForChild("DailyShopHandler")
local DailyMod = require(Folder.CurrentShop)

local PossibleSkins = {}


local function CreateSkinTable ()
	local unitSkins = RS:WaitForChild("UnitSkins")

	task.wait(3)

	for _, tower in pairs(unitSkins:GetChildren()) do
		if tower:IsA("Folder") then
			for _, skin in pairs(tower:GetChildren()) do
				if skin:IsA("Folder") then
					if #skin:GetChildren() >= 7 then
						print("Skin found")
						local skinPrice = skin["SkinPrice"].Value
						table.insert(PossibleSkins, {tower = tower.Name, skin = skin.Name, price = skinPrice})
						print(tower.Name.." inserted")
					end
				end
			end
		end
	end

	print("PossibleSkins:")
	for _, skinData in ipairs(PossibleSkins) do
		print(skinData.tower, skinData.skin, skinData.price)
	end
end


Schermafbeelding 2024-04-06 172844

Are you sure that ‘SkinPrice’ remains in the same ‘Content’ folder during the playtesting and that it doesn’t get removed? Are you also sure that it gets the correct folder - how many folders are under ‘Evelyn’?

1 Like

was indeed an issue with another script deleting parts of it that I looked over, appreciate the help

1 Like

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