Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Enable user to make something out of two blocks?

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.

1 comment

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

2 answers

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?

1 comment

0

Either edit your question or just comment on them. You answered your own question with a question

This discussion is preserved as it was. New answers, comments, and votes are closed.