How to questions

how would I make an overlay say how many buttons are left?

properties :sunglasses:
no but seriously properties, and counters
↓

1 Like

Could you be a bit more specific?

Have a property linked to a counter, make that counter go down with every button pressed, use a trigger loop that constantly triggers blockcode for the game overlay saying how much buttons are left.

1 Like

So I want a game overlay to show a specific number that’s on a counter after a button is pressed

when button pressed → increment counter

No, its decrement counter.

Oh ok then listen to CustomCoaster. But CustomCoaster, we don’t need the trigger loop. Just have it so that when the property updates, a channel sends that the code runs on.

OKOK think like this "Your playing a Roblox tycoon and on the side it says how many buttons you need to buy before ur done with the tycoon that’s what I want

yeah so

listen to customcoaster (sorry)
and

how would I do the block code (I’ve never used the code before)

Please do not acronym me, your going to confuse me with someone else.

Basically when a button is bought, then decrement a counter. That counter should update a property. When that property changes, then broadcast a message. When the game overlay receives that in a block, it should run this code:

Set text | get property "property in counter"

I know sorry

1 Like

Counter value: number of buttons
All buttons transmit on “buttonFound”
Decrement when receiving on this channel.

Also a property (numButtonsLeft) is updated with the counter.
The property is number, and player scoped.

Grab an overlay that has a block that runs on the “buttonFound” channel.
And the overlay changing scope is player.
Blocks:

Set Text: Create Text With: Get Property "numButtonsLeft"
-------------------------- buttons are left
2 Likes

I’m still kinda confused lol I’m dum sorry but how would I make the property change?

Link the property to the counter
go to your counter, go to “property” enable the thing, input the property name, and your done.

The property is changed by the counter. Go to the property setting in the counter, have it change a property, type the name of the property in.

is this the code I use or no?
image

Ok so I have everything else but the part for the overlay rn