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

How do I script food/drink machines so they give me a certain food/drink? [closed]

Asked by 7 years ago

I am a beginner scripter, and am currently making my Cafe. All I need to do is script the food and drink so they give me that certain thing.

0
Hmmm. I don't know. hiimgoodpack 2009 — 7y
0
You need to post things you've already tried. Don't expect us to script the game for you. If you are looking for the concept, just have a click detector attactched to each button and have them each clone the drink into the workspace or directly into the backpack. Viking359 161 — 7y

Closed as Non-Descriptive by unmiss

This question has been closed because its title or content does not adequately describe the problem you are trying to solve.
Please ensure that your question pertains to your actual problem, rather than your attempted solution. That is, you were trying to solve problem X, and you thought solution Y would work, but instead of asking about X when you ran into trouble, you asked about Y.

Why was this question closed?

2 answers

Log in to vote
0
Answered by 7 years ago

Im not quite the best at scripting, but what I think you have to do is make the model of the food/drink then put that model into serverstorage, after that make an event in your script so that when for example, a button is pressed, it will put the food/drink into the players inventory using

name-of-food-or-drink.parent = game.StarterPlayer

I dont know, but just try this, and if it doesnt work, then try putting it into a local script

0
You'd need .Parent, and the StarterPlayer is the settings for the players, not the backpack. Viking359 161 — 7y
Ad
Log in to vote
0
Answered by
H4X0MSYT 536 Moderation Voter
7 years ago

Clone a tool to the players BackPack when a certain button is pressed or touched. Like others said. Not a request site. If you don't know how to Clone() or access the BackPack, you haven't tried anything, or probably can't even script.