which line of code is it giving the error.
local targetGuiObject = Parent:FindFirstChild(propertiesTable.Display.Title.Text)
What is the targetGuiObject name you are trying to find. Is it same as the Bunny name? Because the text has a space on it.
Yes it is the bunny name if that is what you are asking
I could delete the function but then I would need to find the icon of the bunny and the title text with something else.
No, don’t. Were almost there.
You can try doing this:
local targetName = propertiesTable.Display.Title.Text:gsub(" ","")
local targetGuiObject = Parent:FindFirstChild(targetName)
still saying ServerScriptService.BunnyHandler.MainBunny:29: attempt to call a nil value on targetGuiObject
So do you know what do i do now?
Ok so in your serverscript, add the TableName so:
for k, v in pairs (BunnyConfig.Bunnys) do
if k == bunnyName then
BunnyModule:CheckBunnyFromID(v,k)
break
end
end
Then from there you add the other value here on the CheckBunnyFromID
function Module:CheckBunnyFromID(BunnyID, BunnyName)
Then add it here:
FoundBunnyUI.Icon.Image = Module:SetProperties(FoundBunnyUI.Icon.Image, BunnyID, BunnyName)
Then add it here:
function Module:SetProperties(Parent, propertiesTable, name)
local targetGuiObject = Parent:FindFirstChild(name) -- I don't really know what your trying to find here
if targetGuiObject and targetGuiObject:IsA('Frame') then
targetGuiObject = targetGuiObject:FindFirstChild('Label')
end
if not targetGuiObject then
continue
end
for propertyName, propertyValue in pairs(propertiesTable.Display) do
targetGuiObject[propertyName] = propertyValue
end
end
Ok now that I think about it, this whole thing is really messed up on the CheckBunnyFromID. But still try and see if it works.
still saying ServerScriptService.BunnyHandler.MainBunny:28: attempt to call a nil value
Maybe the name of the object doesn’t exist? Maybe try revising and see. Because its finding something within the name of the Bunny name ID from the table.
Nope still showing the same error
No, check to see if the name exists in your guis.
The name dosent exists, i dont see anything other then the frames and the image labels I added.
Exactly, that is your problem right there.
So how would I fix this? Add a value in the title that we can change to fit the bunny name?
Could you show the whole explorer that has all the guis or the part that was for the script.