I'm making a game like Bigshot's Pizzaria.

[hats] Ordinary Imaginations
Joined 25/07/2020
Posts 253
12:13 AM 21/11/2020
And I need help. In Bigshots Pizzaria you click bricks and the dummies walk away. Also, how do you make a money counter that updates in a chosen amount of time.


qhl
Joined 17/09/2020
Posts 130
12:55 AM 21/11/2020
I don’t know how to do it


[BHSC] JadeJokester
Joined 07/10/2019
Posts 9,486
02:54 AM 30/11/2020
let button = new Brick(new Vector3(2,2,2), new Vector3(-1,10,-1), "#ff0000"
button.clickable = true
button.clickDistance = 10
let bot = new Bot("customer")
bot.setPosition(new Vector3(-2,-5,-2)

Game.newBrick(button)
Game.newBot(bot)

setInterval(function(){
bot.moveTowardsPoint(new Vector3(-2,9,-2), 5)
},5000)

button.clicked((player, secure) => {
if (!secure) return
bot.moveTowardsPoint(new Vector3(-2,-5,-2), 5)
})

idk this might work
of course you can change things such as where the button is and where the bot goes but this is just a little thing


[Code] Noah Cool Boy
Joined 20/06/2019
Posts 280
06:59 AM 30/11/2020
Quote from JadeJokester , 02:54 AM 30/11/2020
let button = new Brick(new Vector3(2,2,2), new Vector3(-1,10,-1), "#ff0000"
button.clickable = true
button.clickDistance = 10
let bot = new Bot("customer")
bot.setPosition(new Vector3(-2,-5,-2)

Game.newBrick(button)
Game.newBot(bot)

setInterval(function(){
bot.moveTowardsPoint(new Vector3(-2,9,-2), 5)
},5000)

button.clicked((player, secure) => {
if (!secure) return
bot.moveTowardsPoint(new Vector3(-2,-5,-2), 5)
})

idk this might work
of course you can change things such as where the button is and where the bot goes but this is just a little thing
That isn't valid
Here are some problems

You are missing ) on the first line
You are missing ) on the 5th line
move towards point =/= move to point
Move towards point will move 1 100th of a stud multiplied by the speed towards a point
Making this every 5 seconds will practically not move it
As for the button, you can spam it to keep the bot at the start

1