Cant add script as variable

I dont know how to describe this but I cannot add this script to the variable section. It was just set, but I removed it and added it back. my mouse turns to a circle with a line throuh it here is my 10 year old artistic skills drawing the problem.

,I dont know if that title is right I dont know how to describe this. I had it working a few minutes ago and I removed the variable from my code then added it again but now I get a circle with a line through it when I drag the script over. Here is my attempt of drawing this with the capabilities of a 10 year old.

You cant set a script from proyect to a variable, if you want that, make a new empty gameobject, atach your script to it and then drag the object to your variable in playercolision.

What are you trying to do exactly? You can’t reference the script as a variable. As the above poster has said, you can add the script to a gameobject and then reference that but even still, I don’t understand what you are attempting.


If you want the collision script to handle movement, you need to make your movement script public and then reference it within the code or just incorporate the collisions into the movement script.