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

Enable user to make something out of two blocks?

Asked by 8 years ago

My aim is to check the players backpack to see if they have 2 required items, so I want to check their Backpack for item 1 and item 2 and then I want to make it so they can then click a button: 1) click a button 2) Check to see after click if they have the items needed 3) if they have take the required items and give them a different item that is supposedly made from the two items that have just been taken

I just need to know where to start as I'm finding it difficult to start to code the process.

Thanks for help in advance.

0
Like eLunate said, you need to use an if statement, a MouseButton1Click (I prefer MouseButton1Down), and FindFirstChild. If you are unsure how to do this then I suggest you learn a few more basic consepts of Lua before you keep going lightpower26 399 — 8y

2 answers

Log in to vote
1
Answered by 8 years ago

This is incredibly broad, but here:

0
Thanks for help guys im well on my way now:) Benmz41998 19 — 8y
Ad
Log in to vote
-1
Answered by 8 years ago

ive set the variables, : local humanoid = part.Parent:FindFirstChild("Humanoid") local Character=part.Parent local Name=Character.Name local Backpack=game.Players:findFirstChild(Name).Backpack

Now would I find the children of the backpack and check if they have the blocks and then activate the function if they have?

0
Either edit your question or just comment on them. You answered your own question with a question lightpower26 399 — 8y

Answer this question