Child GUI controls to character controller

Hi,

I have a character controller that happily walks around the scene controlled by two GUI joystick and some buttons, I was going to make the character controller a prefab so what I did was to drop the GUI controls onto the the character controller to make them children of the character controller, but now when I move the GUI controls disappear off screen, why? do I need to clamp them to the screen? or something else?

Thanks.

create an empty game obeject and attach the gui joystick script to it, then make it a prefab, like that you don’t have to worry about positions
PS ;
you may need to use GetComponent