I want to know how to make a part go in the players backpack so the game could be complete.
COMMUNITY QUESTION
How to make a Part go in the Players backpack?
2 answers
Very simple, just parent the part into the back pack
--FOR USE IN LOCAL SCRIPT
Part = game.workspace.Part
Part.Parent = game.Players.LocalPlayer.Backpack
--FOR USE IN NORMAL SCRIPT
Player = game.Players.SpyGuyTBM
Part = game.workspace.Part
Part.Parent = Player.Backpack
This is how u do it in one line :P
game.workspace.Part.Parent = game.Players.LocalPlayer.BackPack
That may not work ^ but it is still one line :D XD
This will work I guarantee you
local part = -- your part
local player = game:GetService("Players").LocalPlayer
local backpack = player:FindFirstChild("BackPack")
if player then
if part then
if backpack then
part.Parent = backpack
end
else
print("Dude, alter the variable called "Part" and then try again")
end
else
print("I should probably load first")
end
Their is no way that shouldn't work ^^^^^^^
This discussion is preserved as it was. New answers, comments, and votes are closed.

1 comment
put the parts parent in the backpack if u want it in there