first off, why is all this inside OnGUI? only your first line belongs there. Move the rest to Update().
you should also cach your Components instead of searching for gameobjects all the time.
Your error message tells you what is going wrong. you cant subtract a number from a string
var stringToEdit = 123;
var divide = 1;
var LeftArm;
var RightArm;
var Torso;
var script : Graphics3;
fuction Start()
{
LeftArm = GameObject.Find("ForUnity/Left Arm").GetComponent(Graphics3);
RightArm = GameObject.Find("ForUnity/Right Arm").GetComponent(Graphics3);
Torso = GameObject.Find("ForUnity/Torso").GetComponent(Graphics3);
}
function Update()
{
if (Input.GetKeyDown( KeyCode.Return ))
{
LeftArm.url = "http://roblox.com/asset/?id=" + stringToEdit;
RightArm.url = "http://roblox.com/asset/?id=" + stringToEdit;
Torso.url = "http://roblox.com/asset/?id=" + stringToEdit;
}
}
function OnGUI ()
{
// Make a text field that modifies stringToEdit.
stringToEdit = parseInt(GUI.TextField(Rect(10, 10, 200, 20),stringToEdit.ToString()));
}
something alonh those lines… note I’m nomally not scripting in UnityScript, there might be errors.
Also I dont know what the “http://roblox.com/asset/?id=” + stringToEdit -= divide; part was about