Help for To Use an script's effect(s) on gameobject for a certain Duration

I would like to know how to use an effect of a script for a certain duration like 5 seconds and just after the script no longer takes effect

Hi,

Have you already tried to use the Destroy method? With the second parameter, you can delay the destroying. Look the method up in the API if you don’t know what I mean.

If you want to disable the component, you could call Invoke. See the API.

Did this help?


See also:

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms