[SOLVED] Cannot read property 'rollDice' of undefined

I am trying to call a function in script from another. The end result should be when I click a button, it calls the function on another object. But, I keep getting this error and this is worst kind of error in my opinion because I can never find the information I need to fix it myself. Most suggestions say it may be caused by referencing a deleted or destroyed entity, but all entities I am trying to reference are in place.
Here is the link to the editor, the error comes up on line 56 of the Buttons script.
https://playcanvas.com/editor/scene/581391

Instead of dice.script.ApplyForce.rollDice(event); it should be dice.script.applyForce.rollDice(event);. When you are trying to access a script you must get it by using its name (the string passed in pc.createScript()) not its filename.

Ah, thank you. I’ll remember that.