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: Terrain.Touched

Previous Thread :: Next Thread 
QuickArchangel is not online. QuickArchangel
Joined: 05 Dec 2012
Total Posts: 71
21 Jan 2016 01:39 PM
This only prints when the Torso,Head or HumanoidRootPart touches. shouldn't it print when the legs hit the Terrain like it does with a part? how would i make it fire when the legs touch the terrain ?

function onTouched(hit)
print(hit)
end
workspace.Terrain.Touched:connect(onTouched)


=}0 0{=
Report Abuse
QuickArchangel is not online. QuickArchangel
Joined: 05 Dec 2012
Total Posts: 71
21 Jan 2016 03:11 PM
^


=}0 0{=
Report Abuse
sketcher28jr is not online. sketcher28jr
Joined: 21 Jul 2009
Total Posts: 63
21 Jan 2016 03:20 PM
function onTouch(hit)
leg = hit.Parent:FindFirstChild("LeftLeg")
if leg ~= nil then
print "Why am i helping you?"
end

game.Workspace.Terrain.Touched:connect(onTouch)

^ Try that.
Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
21 Jan 2016 03:38 PM
I already tried making touched functions with terrain. It doesn't work ingame ;-;
Report Abuse
QuickArchangel is not online. QuickArchangel
Joined: 05 Dec 2012
Total Posts: 71
21 Jan 2016 03:41 PM
thanks sketcher28jr but that is not working.may be it's a bug with terrain


=}0 0{=
Report Abuse
QuickArchangel is not online. QuickArchangel
Joined: 05 Dec 2012
Total Posts: 71
21 Jan 2016 05:49 PM
has anyone else run across this before?


=}0 0{=
Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
21 Jan 2016 05:55 PM
read my reply above..
Report Abuse
QuickArchangel is not online. QuickArchangel
Joined: 05 Dec 2012
Total Posts: 71
21 Jan 2016 06:04 PM
i see,RecurringNightmare . it seems to fire on the head and torso.
the wiki said the Touched event, and TouchEnded event work with terrain.

http://wiki.roblox.com/index.php?title=API:Class/Terrain







=}0 0{=
Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
21 Jan 2016 06:05 PM
odd. and yeah i read the wiki
Report Abuse
Funification is not online. Funification
Joined: 22 Jun 2015
Total Posts: 3622
21 Jan 2016 06:22 PM
roblox terrain is not very well for scripting


Funification | Was dominusawesomus | you wil cryying when obama take yur computr |Yee
Report Abuse
RecurringNightmare is not online. RecurringNightmare
Joined: 05 Jul 2012
Total Posts: 15336
21 Jan 2016 06:58 PM
^
Report Abuse
Funification is not online. Funification
Joined: 22 Jun 2015
Total Posts: 3622
21 Jan 2016 08:44 PM
Though, it is going to be some day.
We went from blocky blocks to magnificent works of art in only a few years.

Funification | Was dominusawesomus | you wil cryying when obama take yur computr |Yee
Report Abuse
xXBloxBeastXx is not online. xXBloxBeastXx
Joined: 31 Oct 2012
Total Posts: 158
21 Jan 2016 10:14 PM
BlockyParts.Touched

Pleasure + 1
Report Abuse
Funification is not online. Funification
Joined: 22 Jun 2015
Total Posts: 3622
22 Jan 2016 04:22 PM
^
you made a tiny mistake
its

BlockParts.Touched
Pleasure = Pleasure + 1

Funification | Was dominusawesomus | you wil cryying when obama take yur computr |Yee
Report Abuse
Scerzy is not online. Scerzy
Joined: 27 Dec 2010
Total Posts: 1082
22 Jan 2016 04:26 PM
Terrain isn't a part and so doesn't really have an OnTouched function. Actually it doesn't have much of anything to be scripted with. You best bet is to add an invisible brick to cover whatever part of the terrain you want and then add the ontouch script to that instead


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