for _, child in ipairs(Weapons:GetChildren()) do
if child:IsA("ValueObject") then
BpWeapons[child.Name] = {
Value = child.Value
}
print(BpWeapons)
end
end
Weapons.ChildAdded:Connect(function()
for _, child in ipairs(Weapons:GetChildren()) do
if child:IsA("ValueObject") then
BpWeapons[child.Name] = {
Name = child.Name,
Value = child.Value
}
print(BpWeapons)
end
end
end)
#Table value with name
1 messages · Page 1 of 1 (latest)
im on mobile can you send a screen shot instead
im dont have error, in my Backpack script i have function without saved weapons added to backpack.
im save backpack values without table, but values in table dont named of weapon value name, and backpack script can't create a frame without weapon, because value in table, which clone to a weapons values folder, dont have a normal name and value is nil
so it print nil
yes
and the table value have a name "1"
but need to have a weapon name and rarity value
it is a folder inside a player with values? value need to have a sword name to make a frame in backpack with sword and rarity value
so it’s a stringvalue
and to make it visible on the frame this stringvalue.value has to have the name of the weapon parent
yes
but it print nil so the script don’t detect the weapon name
alr can you do add please : print(child) and send me it please
on Weapons.ChildAdded function as well
and also can I know what is BpWeapons as well if you can show me the line code
.
alr tell me when you added print(child)
you might have to ping me if I don’t respond faster
Send a screen shot on where did you put the print
oh
** You are now Level 3! **
ok, i have a datastore with old tabel who have a value 1, if i start the game, this value copy in a weapons folder, and child in wepons folder is 1
but if im create new datastore and put print child name in function childadded im dont have a output od this command in console
what
all I’m telling you is to print(child) just after ipairs(Weapons:GetChildren()) do and you send me it
im said this is dont work
you dont see my message or what?
what your problem
ValueObject is not a thing that exists. perhaps you meant ObjectValue https://create.roblox.com/docs/reference/engine/classes/ObjectValue