Hello everyone i know i already made a topic about this (Sorry) that was about asking mostly, In This case I’ve put together a script that i just can’t get working.
var Splash : Transform;
var Water : Transform;
WaterInteraction = collider.Transform.ToLower();
if(WaterInteraction == "Water")
{
Instantiate (Splash, transform.position, transform.rotation);
}
It Has no errors when added but when i play, It Comes with some wierd jiberish, Can someone please inspect, figure out what’s wrong with it or fix it, Thanks That’d be a REAL big help, Not only to me, But to some of the Unity Community aswell.
You have posted only the parts of the script, I can’t say what is causing the problem. First, check your splash particles. If particles are ok, when try replacing your code with this:
var Splash : Transform;
function OnTriggerEnter(collider : Collider){
if(collider.name == "Water")
{
Instantiate(Splash, transform.position, transform.rotation);
}
}