|
| 23 Aug 2016 07:44 PM |
function ontouch(hit) if hit.ClassName == "Terrain" then print("yo") if hit.Material == Enum.Material.Plastic then print(hit.Material) print("touched!") end end end
script.Parent.Touched:connect(ontouch)
I want it to where if it touches Water it does its purpose, it only works as .Plastic, because without the if then(material) then it says everything is plastic?
|
|
|
| Report Abuse |
|
|
|
| 23 Aug 2016 07:50 PM |
| Pretty sure that isnt possible with terrain. |
|
|
| Report Abuse |
|
|
|
| 23 Aug 2016 07:54 PM |
Well it does work for the functioning, but it classifies all of the terrain as Enum.Plastic even if it's water, so i'm trying to find out a solution to that, i know that it shouldn't work like that because you can use scripting to do workspace.Terrain:FillBall(Vector3.new(0,0,0),5,Enum.Material.Water) which will make Water fill into a ball form.
So i'm curious as to why if you can classify it when you script it, why is it saying that everything is plastic with ontouch? |
|
|
| Report Abuse |
|
|
| |
|
| |
|