Getting the error: ServerScriptService.BunnyHandler.MainBunny:28: invalid argument #1 to 'pairs' (table expected, got nil)

No it is still saying the same thing but now on the [FlowerBunny]

Module.Bunnys = {

	["NormalBunny"] = {
		Icon = 'rbxassetid://9432469802',


		Display = {

			Rarity = Module.Rarities[1],

			Title = {

				Text = 'Normal Bunny',
				TextColor3 = Color3.new(1, 1, 1),
			},
		},
	}
	
	["FlowerBunny"] = {
		Icon = 'rbxassetid://9432469802',


		Display = {

			Rarity = Module.Rarities[1],

			Title = {

				Text = 'Normal Bunny',
				TextColor3 = Color3.new(1, 1, 1),
			},
		},
	}

Which line of code does this error pop up on

["FlowerBunny"] = {

that is the code where the error pops up

Hmm maybe replace it with:

FlowerBunny = {

Do it for each one as well.

Nope still not working. This is getting annoying lol

Oh i fixed it, I am going to test it now :slight_smile:

It probably broke another function, there is supposed to be another place where the function ran and it gave the error, could you show me which one it is?

Edit: Nevermind.

NOOOOOOOOOOOO IT IS STILL GIVING THE SAME ERROR ServerScriptService.BunnyHandler.MainBunny:28: invalid argument #1 to ‘pairs’ (table expected, got nil)

it is still the line

	for guiObjctName, labelProperties in pairs(propertiesTable) do

the entire function is this

function Module:SetProperties(Parent, propertiesTable)
	for guiObjctName, labelProperties in pairs(propertiesTable) do
		local targetGuiObject = Parent:FindFirstChild(guiObjctName)
		if targetGuiObject and targetGuiObject:IsA('Frame') then
			targetGuiObject = targetGuiObject:FindFirstChild('Label')
		end
		if not targetGuiObject then
			continue
		end
		for propertyName, propertyValue in pairs(labelProperties) do
			targetGuiObject[propertyName] = propertyValue
		end
	end
end

Ok so replace this:

for k, v in pairs (BunnyConfig.Bunnys) do
			    if v == bunnyName then
			       bunnyID = v
			        break
			    end
			end

with:

for k, v in pairs (BunnyConfig.Bunnys) do
			    if v == bunnyName then
			         BunnyModule:CheckBunnyFromID(v)
			        break
			    end
			end


see still getting this now :frowning:

Why is it so low quality lol
here is a better one

no remove the function outside the loop because I already fired it from inside.

Now nothing happens when i touch it

Print inisde the for k, v pairs loop “k”. Does it print? Also make sure to leave the

BunnyModule:CheckBunnyFromID(v)

Inside the loop and delete the one outside.

In the loop and what do i print in it also I did delete the one outside

print (k) if it prints then it should work.

it printed all the bunnys, it cycled through them, one time it printed normal bunny the next flower bunny and the next apple bunny. And I only touched normal bunny

Exactly it checks through to see which bunny it is. Thats how it works with the loop. It should work now. Does it give any errors? If nothing happens then it has to do with the module function. Maybe try printing there.