I’m trying to divide a number in my gui.textfield
So if I input the number 243 into the textfield it automatically changes it to 242
Heres my code
var stringToEdit : String = "";
var script : Graphics3;
function OnGUI () {
// Make a text field that modifies stringToEdit.
stringToEdit = GUI.TextField (Rect (10, 30, 200, 20), stringToEdit).ToString();
var LeftLeg = GameObject.Find("ForUnity/Left Leg").GetComponent(Graphics3);
var RightLeg = GameObject.Find("ForUnity/Right Leg").GetComponent(Graphics3);
LeftLeg.url = "http://roblox.com/asset/?id=" + stringToEdit -1;
RightLeg.url = "http://roblox.com/asset/?id=" + stringToEdit -1;
}