#when i join in and touch the button it print the random number but after i touch the button again it

1 messages · Page 1 of 1 (latest)

rancid pilot
#

how do i attach the video i recorded with obs

#

it prints, the same number over and over again when i touch it but each time a join it print a different one over and over when i touch the buttom

#

button

grave citrus
#

then just

#

print it over

#

and over

#

not keep rolling

rancid pilot
#

on touch it rolls

grave citrus
#

so

#

just

#

roll first

#

display when touched

#

¯_(ツ)_/¯

rancid pilot
#

no i mean to stop it from reapeating the same number if i roll again

grave citrus
#

each touched

#

new num?

#

ok i missunderstood the first time mb

#

show code

rancid pilot
#

alr

grave citrus
#

youre rolling once

#

on top of a script

rancid pilot
#

how

#

elaborate

grave citrus
#

u roll

#

on top of script

#

not inside touched

#

so it rolls once

rancid pilot
#

oh ok

grave citrus
#

just

#

copy the local s1 s2 s3 thing

#

and paste it inside touched

#

just remove local

rancid pilot
#

so its bc the function part?

grave citrus
#

currently u roll it at start of code

#

so it only randomizes it ONCE

rancid pilot
#

no

grave citrus
#

when script runs for first time

rancid pilot
#

oh yea

grave citrus
#

and u goinna update them inside touched

rancid pilot
#

just move the thing inside function over to touch

grave citrus
#

if u move

#

it will error

#

cuz its local variable

#

not accessable by other functions

rancid pilot
#

yea

grave citrus
#

such as roll()

rancid pilot
#

ill make it global then

grave citrus
#

and should work

#

touched will update global

#

(before roll() plz)