- Home /
How to fix a text that didn't popped up when collide with player?
So i was making a collision when the player collide the text will appear, but why the text doesn't pop up even though i made the code and insert the text into the code? There are no compiling errors or anything, just the text not popping up. Here is some of my screenshots,Why is the text doesn't appearing even though i already put the text in the code? There are no compiling errors or anything, just the text not popping up. Here is my screenshot
[1]: /storage/temp/183093-screenshot-19.png
,
Answer by rage_co · Jul 06, 2021 at 04:05 PM
when comparing tags you should use gameObject.CompareTag(string tag) to achieve proper results...also WaitforSec is not spelled right in the StartCoroutine.......the W is uppercase....both these fixes should do it...hope this helps
In addition: OnCollisionEnter also has to be upper case with a capital O
It can help if you'd post the code using the code formatting next time instead of adding an image.
yep @gioasiku16 please use a code formatter next time.....when you are posting a question or an answer here.....you will see an icon which goes like 101010...use that...
Your answer
Follow this Question
Related Questions
OnTriggerEnter and GUIText problem 0 Answers
UI Text isn't updating text on Button click during the gamePlay [Read description], 0 Answers
How to Prevent Rolling Cube from Climbing Up Walls 0 Answers
write text on original texture? 0 Answers
using json file for waypoints for vehicle in unity project. 0 Answers