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

Is there specific player only backpacks?

Asked by 7 years ago

Is there any way to make a specific character spawn with certain items. Example say my name is Anonymous9201 (it is) and I spawn into a game. I want an item that will only spawn with me. Is there any way to do that? Thanks for the help!

1 answer

Log in to vote
0
Answered by
Drogb4 15
7 years ago

Yes, first of all you make function that gets the player when he joins the game, then you make an if statement to check the player's name, if it is true then you :Clone() the item you want from wherever you have it stored, lets say you store your items in "ReplicatedStorage" and finally you set its parent in the player's backpack.

Game.Players.PlayerAdded:connect(function(NewPlayer) 
if NewPlayer.Name == "Anonymous9201" then
game.ReplicatedStorage.ITEMNAME:Clone().Parent = NewPlayer.Backpack
end
end)

You can also adapt it to add multiple items, or give it to multiple usernames

0
You can do that OR you can use the built in Roblox admin tools if you want it associated with a gamepass. iiFlamingIcicle 45 — 7y
Ad

Answer this question