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

How can I make a script to copy the player's inventory and put it in the starter pack?

Asked by 10 years ago

I've already asked this, don't bug me about it. The original post had wrong answers, so I deleted it. Thanks to anyone who tried to help in the original though.

I need a script for an OnTouch function for a brick called "button" that will clone the player's inventory and place it in the workspace when touched.

And please, this is for Build mode, not Studio mode, so don't give me any of this "Copy and Paste" stuff. I need a script. If you need to, look up the difference between Build Mode and Studio Mode.

2 answers

Log in to vote
0
Answered by
Tesouro 407 Moderation Voter
10 years ago

There is no "OnTouch function", there is a .Touched event and this is not a question, it's a request, so please don't do that.

Ad
Log in to vote
0
Answered by
HexC3D 830 Moderation Voter
10 years ago

Ok you can make a Gui to make sure this works.. -- Let's say there is a ScreenGui then a Frame then a Text Button

Player = script.Parent.Parent.Parent.Parent
script.Parent.MouseButton1Clicked:connect(function()
z = Player:WaitForDataReady("Backpack"):GetChildren()
for k = 1,#z do
 z[k]:Clone().Parent =  Player:WaitForDataReady("StarterGear")
end)

Answer this question