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

How to put things into starterpack?

Basically I want the players to have their swords put into Starterpack, how do I do that?

Player = game.Players.LocalPlayer

Sword = game.Lightning.Sword:clone()
Sword.Parent = Player.Backpack

1 comment

0

Is this a local or server script? :)

2 answers

✓ Accepted answer

Simply put the Sword into the Starterpack in Studio!

Alternatively, put the following into your command bar:

game.Lighting.Sword.Parent = game:GetService("StarterPack")

Note: On line 3 in your code, you misspelled "Lighting"

EDIT If you meant clone a tool into a player's backpack, you would use the following:

local ServerStorage = game:GetService("ServerStorage") --Use ServerStorage instead of lighting!
local Players = game:GetService("Players")
local Sword = ServerStorage.Sword

function giveTool(player, tool)
	--- Places a tool inside a player
	--@param Player player the player who will receive the tool (userdata)
	--@param Tool tool the tool the player will be receiving

	tool:Clone().Parent = player.Backpack
end

giveTool(Players.Narrev, Sword)

1 comment

0

If you want the game to run on a Server you would have to use ReplicatedStorage.

Actually, you don't need a script at all to insert a sword in the StarterPack. The most simple was to do this is that you can search for a sword in the toolbox, click the best sword, then from the Workspace, you can drag it into the StarterPack.

2 comments

0

Yeah that's true, but I was making a shop gui :D!

0

Oh well, AlvinBloxx has a tutorial about that visit his page oon youtube.

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