Edit: Realized I was being dim never mind:P I'm a bit new at this so sorry if this is a silly question. But I was wondering if anyone could help. So I'm trying to simulate pulling out custom die from a bag and rolling them then keeping them on the table to do stuff with later. To do this I've made a custom deck of cards where the player would pull out 3 "dice". For each type of dice I've made a roll-able table. I want to roll the dice then update the images of the cards on the table to the results of the roll. When I log() the results of what I've got so far (below) its gives what I want but doesn't seam to update the stuff on the table. Is there a way of making my tempRoll into a global variable then I think I could use what I've already written to update the stuff on the table? sendChat("API","/roll 1t["+hand.Dice[0]+"] + 1t["+hand.Dice[1]+"] +1t["+hand.Dice[2]+"]", function(tempRoll) { for (var i=0; i<3;i++){ hand.Roll.push(JSON.parse(tempRoll[0].content).rolls[2*i].results[0].tableItem.name); //Puts name of result into hand.Roll
hand.RollImg.push(JSON.parse(tempRoll[0].content).rolls[2*i].results[0].tableItem.avatar); //Puts img URL into RollImg
getObj("graphic",hand.DiceId[i]).imgscr=hand.RollImg[i];
//Changes Image of card on table to image of token }
});
//hand.Dice holds the names of the rollable tables that have been pulled out
//hand.DiceId holds the _id of the token on the table