Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How would I clone something to everyones startergear?

Asked by
IcyEvil 260 Moderation Voter
8 years ago

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

3 answers

Log in to vote
0
Answered by 8 years ago

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
0
This is actually more to the question I wanted as an answer. IcyEvil 260 — 8y
Ad
Log in to vote
0
Answered by
NotSoNorm 777 Moderation Voter
8 years ago

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).

0
would I need a local script? IcyEvil 260 — 8y
0
For dynamically, Just put the tool under StarterPack if you don't want to do any scripting NotSoNorm 777 — 8y
0
I dont want everyone to immediately have it though, I just want it to where if an admin says so everyone gets one. IcyEvil 260 — 8y
0
Say that in the question then... NotSoNorm 777 — 8y
Log in to vote
0
Answered by 8 years ago

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 :)

Answer this question