Tool not moving to startergear

Anybody know why this isn’t cloning into StarterGear? it only goes to backpack

Server Script
game.ServerStorage.Tools.Tool:Clone().Parent = player.StarterGear and player.Backpack

this is a copy from a script… not the entire script obviously

Make sure the Archivable is set to true.

Edit: read more

Yep, it is set to Archivable… i dont think that’s the problem

This should work.

game.ServerStorage.Tools.Tool:Clone().Parent = player.StarterGear game.ServerStorage.Tools.Tool:Clone().Parent = player.Backpack

Thanks! This seemed to work… appreciate it

1 Like

Remember, the and operator is for logical parsing and cannot be used to set multiple parents of an instance.

Use this simple non-scalable technique:

game.ServerStorage.Tools.Tool:Clone().Parent = player.StarterGear
game.ServerStorage.Tools.Tool:Clone().Parent = player.Backpack

However, it is always good to make your code scalable:

local appendees = {
    player.StarterGear,
    player.Backpack
}

for index, value in pairs(appendees) {
    game.ServerStorage.Tools.Tool:Clone().Parent = value
}

Edit: I sould also mention, the starter gear is a replication storage solution, so clone to it only once, and when a player joins, they will be given the instances inside.

1 Like