#how do i give something a random chance
30 messages · Page 1 of 1 (latest)
Once your ticket has been resolved, please close it with </ticket close:1054771505520717835> command!
rn my method is js if (Math.random() < 0.3) { *code here* }
but that doesnt work
it either always happens or never happens
try Math.random()
i forgot the parenthesees in the codeblock sorry
i have the parrentheses in the actual code
and it is in startup scripts
I'm confused
can you define math.random as a var before the if
output it to chat
then perform the if on that variable?
yes
for example
var random = Math.random();
Utils.server.tell("Random: "+random);
if(random < 0.3) {
code
}
thats exactly what i just wrote
oh lol
ok ill try
@olive breachresults?
wait im in class