Ad
Log in to vote
0

How to make a Part go in the Players backpack? [closed]

Asked by 9 days ago

I want to know how to make a part go in the players backpack so the game could be complete.

0
put the parts parent in the backpack if u want it in there hiimgoodpack 660 — 9d

Closed as Not Constructive by PyccknnXakep, Void_Frost, 2eggnog, and Thetacah

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Hi.

Looks like you're using an ad blocker.

That's fine...

No, it really is.

Just, I mean, we put a lot of work into this site, you know?

It would be really really appreciated if you would turn off your ad blocker for our website...

We tried really hard to make our ads as unobtrusive as possible.

If you really hate ads, would you consider a $2 donation via Patreon?

Here's the link.

We love you. We hope you love us too.

.

..

...

Now back to your regularly scheduled Scripting Helpers....

...

..

.

2 answers

Log in to vote
0
Answered by
SpyGuyTBM 318
9 days ago

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
Ad
Log in to vote
0
Answered by 9 days ago

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 ^^^^^^^

Ad