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

How do i move a gear to StarterPack from Workspace?

Asked by 7 years ago

Hi! I'm scripting a game called Battle Scars and i've tried a few ways that haven't worked. So one of then i tried was: ~~~~~~~~~~~~~~~~~ local Gun = game.Workspace.Gun

Gun.Parent = game.StarterPack ~~~~~~~~~~~~~~~~~ (i had a little more then that but it's what i wanted to do in one section of the script anyway)

And it never worked! I dont know if the script i used worked because when i went to the button "Look for Error" it was grey, and i couldn't click it which i know SOMETHING was right.

Also it had a teleportation system where the player teleported to a part which still wasn't functional and when it touched the baseplate (i know how to do that part) and it will give you the gun, and other then that the teleporter didn't really work or did the script?

If you noticed my account i asked the question on looks i started not even a month ago, i made this because my other account Chez_Guy has safe chat enabled, so i could'nt input the code. So i made an acount for this.

0
Just simply switch the parent, or click & hover your tool into the StarterPack service in the Studio. TheeDeathCaster 2368 — 7y
0
I know that thank you but by code! XD Chez_Guy 67 — 7y

1 answer

Log in to vote
0
Answered by 7 years ago

When the game is started, the StarterPack inside a player is called "Backpack".

Therefore, you would need to do:

local gun = game.Workspace.Gun:Clone()
gun.parent = player.Backpack
0
Thank you so much! :DDD Chez_Guy 67 — 7y
0
No problem! :) jjwood1600 215 — 7y
Ad

Answer this question