#Attempt to index nil with GetChildren for character

18 messages · Page 1 of 1 (latest)

real talon
#

I identified char

#

as plr.Character

fast pier
#

and whats the player local

real talon
#

plr

#

Playeradded

fast pier
#

probably character is nil

#

local Char = plr.Character or plr.CharacterAdded:Wait()

real talon
#
    local Char = plr.Character
    local backpack = plr.Backpack
    local ItemTable = {}


    for i,v in pairs(backpack:GetChildren()) do
        table.insert(ItemTable,v.Name)
    end

    
    for i,v in pairs(Char:GetChildren()) do
        table.insert(ItemTable,v.Name)
        print("wsp")
    end
    
    MainData:SetAsync(plr.UserId,ItemTable)
    
end```
#

i don't think so

fast pier
#

yes is that

fast pier
#

yes, playaer loads lot faster than char

real talon
#

oh so i try that in the locals line?

fast pier
#

just change the local char for that

#

local Char = plr.Character or plr.CharacterAdded:Wait()

real talon
#

alr ill try

#

worked wow

#

rtam]