Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

RBXScriptSignal error trying to make a backpack script?

wait(1)
added = game.Players.LocalPlayer.Backpack.ChildAdded
Name = script.Parent.ScrollingFrame

game.Players.LocalPlayer.Backpack.ChildAdded:connect(function()
	if Name.Text1.Text == "" then
		Name.Text1.Text = added.Name
	end
end)

and this is the error

Name is not a valid member of RBXScriptSignal

any help because i rlly cant solve it

the problem is on line 7

6 comments

1

What are you trying to do? ChildAdded is an event and RBXScriptSignal is an object passed back from an event which does not have a Name propertie.

0

i am trying to make an inventory system with names of the item thats added to the backpack (picked up, loot drops, etc)

0

ChildAdded passes the object that was added as an arg you can simply use its name?

0

yea but how do i know the items name if its picked up or randomly dropped ??

0

What line is tihs error on? Right now it just sounds like a CoreScript error.

0

@TigerClaws454 object.Name ? pls check th wiki page

1 answer

✓ Accepted answer

You try to get the name of the event ChildAdded. Thats not possible, you can however give the Child that was added, as an argument in the function like so:

game.Players.LocalPlayer.Backpack.ChildAdded:connect(function(Child)

To fix your script we can simpfully do the following:



Name = script.Parent:WaitForChild("ScrollingFrame")

game.Players.LocalPlayer.Backpack.ChildAdded:connect(function(Child)
    if Name.Text1.Text == "" then
        Name.Text1.Text = Child.Name
    end
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.