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

How to hand an item to another player?

Asked by
WindNT 16
7 years ago

Hi! I need a "hand item to player" script in my Cafe. I was thinking of ways to do this and figured I needed to know what item was currently in the players hand. I am not completely sure how to go about establishing what item is currently in the players hand.

Any help/advice/questions will be appreciated! :D

Cheers, WindNT

0
is this like a shop? BlackOrange3343 2676 — 7y
0
More like a restruant where the staff would hand food to player. Eg. Coffee, Doughnuts WindNT 16 — 7y
0
Since you didn't provide any code, you can adapt your idea to something I already answered. https://scriptinghelpers.org/questions/43420/torso-not-valid-member-of-workspacemodel#44797 Azarth 3141 — 7y

1 answer

Log in to vote
1
Answered by 7 years ago
Edited 7 years ago

Currently equipped item is stored inside player.Character, a model inside of workspace. So, you could check if there is a tool in character using FindFirstChildOfClass, then simply check its name and change the parent to the other player's backpack.

0
Thanks for your response! Let me try it and I will let ya know if it works / accept the answer :D WindNT 16 — 7y
0
That worked GREAT! Thanks again :D WindNT 16 — 7y
Ad

Answer this question