Question by
levi200 · Feb 10, 2016 at 03:35 PM ·
scripting problem
How can I fix this script or make one similar?
I am currently trying to make a script that, if applied to a game object, it will knock or hit my player/controller back a certain distance. Currently I have this script that seems to be giving me a simple error but I am not completely sure it will work if that error were corrected. Please help.
Thank you.
(sorry that my script is just an image. I'm new to unity and its forums).
knock-back.png
(28.8 kB)
Comment
Answer by Landern · Feb 10, 2016 at 04:14 PM
You don't put the type in quotes.
character = gameObject.GetComponent<FPSController>();