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

How do i move a gear to StarterPack from Workspace?

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.

2 comments

0

Just simply switch the parent, or click & hover your tool into the StarterPack service in the Studio.

0

I know that thank you but by code! XD

1 answer

✓ Accepted answer

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

2 comments

0

Thank you so much! :DDD

0

No problem! :)

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