|
| 15 Jul 2017 09:38 AM |
| How to copy a tool from ServerStorage to the players starter pack? I have tried many times myself, but I cant just get it to work. D: |
|
|
| Report Abuse |
|
|
yin_yang
|
  |
| Joined: 24 Feb 2016 |
| Total Posts: 537 |
|
|
| 15 Jul 2017 09:40 AM |
| use replicatedstorage instead. |
|
|
| Report Abuse |
|
|
|
| 15 Jul 2017 09:40 AM |
| I never used it before so i'm not really sure what to do |
|
|
| Report Abuse |
|
|
|
| 15 Jul 2017 09:43 AM |
How have you tried it?
Best to see where you went wrong so we can try help you ;)
basics; game.ServerStorage.tool:Clone().Parent = player.StarterPack
(cant remember if its starter pack or gear smh) |
|
|
| Report Abuse |
|
|
|
| 15 Jul 2017 09:45 AM |
I know this might be wrong as heck, I don't know much ;-;
local Hiya = game.ServerStorage["Tool"] copy Hiya then paste Hiya tostring(game.StarterPack.localPlayer)
Don't ask what I was thinking ._. |
|
|
| Report Abuse |
|
|
|
| 15 Jul 2017 09:51 AM |
| This is my first time trying to script anything. |
|
|
| Report Abuse |
|
|
yin_yang
|
  |
| Joined: 24 Feb 2016 |
| Total Posts: 537 |
|
|
| 15 Jul 2017 09:54 AM |
when people say programming is just telling your script what to do, they dont mean it literally. :P
this:
copy Hiya then paste Hiya tostring(game.StarterPack.localPlayer)
should be this:
if Hiya then Hiya:Clone().Parent = game.Players.LocalPlayer:WaitForChild("Backpack") |
|
|
| Report Abuse |
|
|
yin_yang
|
  |
| Joined: 24 Feb 2016 |
| Total Posts: 537 |
|
|
| 15 Jul 2017 09:55 AM |
| oops, i forgot to add an end to the end of the code. xdxd |
|
|
| Report Abuse |
|
|
|
| 15 Jul 2017 09:55 AM |
Okay so you got the definement part right
(as users above suggested) looks like ReplicatedStorage is the way to go, so put it into there)
local Hiya = game.ReplicatedStorage["Tool"]:Clone() -- creates a clone of the tool --its cloned, however isnt placed under any tree, so we have to parent it to something Hiya.Parent = game.Players.LocalPlayer.StarterPack
-- this will work in a LocalScript only, since you are using .LocalPlayer
its good to work in studio often with the game/workspace explorer to see and familiarise yourself with the hierarchy/tree of all the objects and service |
|
|
| Report Abuse |
|
|
|
| 15 Jul 2017 09:56 AM |
ah yes,
.Backpack
instead of starterpack lmao |
|
|
| Report Abuse |
|
|
yin_yang
|
  |
| Joined: 24 Feb 2016 |
| Total Posts: 537 |
|
|
| 15 Jul 2017 09:57 AM |
| yea that sort of thing confuses me at times too. you're not alone |
|
|
| Report Abuse |
|
|
|
| 15 Jul 2017 10:14 AM |
Don't use server storage, use replicated storage
|
|
|
| Report Abuse |
|
|
|
| 15 Jul 2017 11:13 AM |
| So where do I put the tool and script into Replicated Storage? |
|
|
| Report Abuse |
|
|
|
| 15 Jul 2017 11:13 AM |
| I cant use grammar right today ;-; |
|
|
| Report Abuse |
|
|