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

How to fix ITEM is not a valid member of Backpack?

So i take a look again it isn't in starter gear but it's in back pack but it still says Fireball is not a valid member of back pack and here's what i do so far:

wait(0)

for i, v in pairs(game.Teams["Civilian"]:GetPlayers()) do

v.Backpack:Fireball():Destroy()

end

7 comments

0

try :WaitForChild()

0

i dont know where to put WaitForChild()

0

Can you explain with more detail exactly what you're trying to accomplish with this script? Also post the script that you have so far

0

ok

0

i think the problem is the proper usage of localscript and normal script

0

if you made something with local script, it wont replicate into the server. which means if you tried to find that thing you made with a localscript you will certainly not find it

0

Should it not be v.Backpack.Fireball:Destroy()? Instead of v.Backpack:Fireball():Destroy().

2 answers

✓ Accepted answer

The problem is that you have Fireball() as a function instead of just getting the instance. Instead of v.Backpack:Fireball():Destroy() do v.Backpack.Fireball:Destroy or v.Backpack:WaitForChild("Fireball"):Destroy()

2 comments

0

I tried but it says Fireball is not a valid member of Backpack

0

Replace :Fireball() with .Fireball

If you made an Instance with a local script, it won't replicate to the server. So if you tried to index it with a normal script it won't work. To test this, go to Test and click Play then you should find "Current: Client" just beside the Play button. So first go to the backpack if you see fireball then click the "Current: Client", it should change to "Current: Server" now go to backpack, if you don't see the fireball then its the problem. If this is the problem then try making the fireball and set its parent to the player's backpack with a normal script.

3 comments

0

If i'm wrong then please edit your question and put your script that makes the fireball

0

Thank you, i just realized that the tool transport into my character model this is helpful :)

0

but still. It only happens if you pull the item out, so if you delete it in the backpack first there will be no item.

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