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 » Scripting Helpers
Home Search
 

Re: How to make things that react to other things?

Previous Thread :: Next Thread 
XDHunterNest is not online. XDHunterNest
Joined: 22 Jan 2012
Total Posts: 31
31 Dec 2013 04:50 AM
What variables would be needed for an object to interact with another object? For example, a pickaxe reacts with a block of stone.
Report Abuse
cody123454321 is not online. cody123454321
Joined: 21 Nov 2009
Total Posts: 5408
31 Dec 2013 04:59 AM
All I am going to do is raise an eyebrow... Do you mean function? If so you may want a hit function if the pickaxe collides with the stone.

object.Touched:connect(function (hit)

end)
Report Abuse
RoflBread is not online. RoflBread
Joined: 18 Jun 2009
Total Posts: 3803
31 Dec 2013 04:59 AM
You'd grab the players mouse from the tool (the pickax), and then you'd say

if mouse.Target.Name == "Stone Block" then
-- do stuff
end

Report Abuse
XDHunterNest is not online. XDHunterNest
Joined: 22 Jan 2012
Total Posts: 31
31 Dec 2013 07:18 PM
Holy hamballs. Thanks guys.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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