so im trying to access a script from another script. and they are attached to the same gameobject
let me know if you need more info.
this is gonna be such an obvious answerlolololololoolllolololololololololololo
so im trying to access a script from another script. and they are attached to the same gameobject
let me know if you need more info.
this is gonna be such an obvious answerlolololololoolllolololololololololololo
It can’t find a class named “PlayerScript”. Are you sure your player script isn’t lowercase? (playerScript)
If both scripts are on the same object then the GameObject.Find is pointless at best and could screw things up. Get rid of it.
You started the name of one of your classes with a lower case letter while at least two other classes start with an upper case letter. You need to choose one approach and stick with it or you’re going to end up with a lot of little headaches trying to remember which one you used.
Please use code-tags and not images to show code.
Thanks.
this is is to access another script. not the playerscript
ive changed all the class things to lowercase. didnt fix anything
ok, so dont make more changes
tell us the current errors
Show us the files involved so if it says error on mything.cs, show that, if the error refers to another class, show that… etc
well i figured it out. or something like that. (i basically copyed the code and put it in a new script, made the appreopriate adjustments and it worked!