How might I make an object rotate based on a variable in my case being speed
Try this in your script update method:
this.entity.rotate(0, this.speed * dt, 0);
this.speed should be a number, which you can also define as a script attribute and tweak it directly in editor.
thank you @Leonidas I will try that