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

How would I clone something to everyones startergear?

The title says it all, I need to know how to do that, and I have no clue how.

3 answers

✓ Accepted answer

I know this is answered, but I thought you will like this answer:

for i,v in pairs(game.Players:GetChildren())do
local weapon = game.ReplicatedStorage.WeaponNameHere:Clone()
weapon.Parent = v.StarterPack
end

1 comment

0

This is actually more to the question I wanted as an answer.

Put it in StarterPack!


wiki on StarterPack:

http://wiki.roblox.com/index.php?title=StarterPack


In case the wiki doesn't clarify enough:

The StarterPack is a place that you put tools so when the player joins, they automatically get them in their backpack.

Now, Let's say you want to dynamically add tools to a players backpack. You'd simply just go script.Tool.Parent = game.Players.LocalPlayer.Backpack that would then add it to the players backpack (with modification of course).

4 comments

0

would I need a local script?

0

For dynamically, Just put the tool under StarterPack if you don't want to do any scripting

0

I dont want everyone to immediately have it though, I just want it to where if an admin says so everyone gets one.

0

Say that in the question then...

I won't give you the admin part, but here is how to do it:

local tool = game.ReplicatedStorage.ToolName:Clone()
local a = game.Players:GetChildren()

for i = 1,#a do
	tool.Parent = a[i].StarterGear -- or Backpack if you don't want it to be permanent
end

Hope I helped :)

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