generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: OnTouch Terrain?

Previous Thread :: Next Thread 
CrixusOdalisManiatus is not online. CrixusOdalisManiatus
Joined: 16 Jun 2011
Total Posts: 5987
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
The_Governator is not online. The_Governator
Joined: 02 Mar 2016
Total Posts: 254
23 Aug 2016 07:50 PM
Pretty sure that isnt possible with terrain.
Report Abuse
CrixusOdalisManiatus is not online. CrixusOdalisManiatus
Joined: 16 Jun 2011
Total Posts: 5987
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
CrixusOdalisManiatus is not online. CrixusOdalisManiatus
Joined: 16 Jun 2011
Total Posts: 5987
23 Aug 2016 08:00 PM
bump
Report Abuse
CrixusOdalisManiatus is not online. CrixusOdalisManiatus
Joined: 16 Jun 2011
Total Posts: 5987
23 Aug 2016 08:31 PM
bump2
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image