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: Need help with an (on touch) script

Previous Thread :: Next Thread 
Im_King is not online. Im_King
Joined: 14 May 2010
Total Posts: 2352
20 Apr 2016 10:40 AM
How would you make a script where somthing happens ONLY when its touching the brick.


Such as... particles in a tire become enabled ONLY when its touching the ground to create a dirt effect
Report Abuse
BenPlaysRobloxYT is not online. BenPlaysRobloxYT
Joined: 05 Oct 2014
Total Posts: 63
20 Apr 2016 10:44 AM
I can help you accept my friend request.
Report Abuse
Im_King is not online. Im_King
Joined: 14 May 2010
Total Posts: 2352
20 Apr 2016 11:04 AM
Accepted
Report Abuse
DevVince is not online. DevVince
Joined: 08 Nov 2008
Total Posts: 9245
20 Apr 2016 11:12 AM
Try this.

script.Parent.Touched:connect(function(hit)
print'Hello, why did you step on me.. :('
end)
Report Abuse
Im_King is not online. Im_King
Joined: 14 May 2010
Total Posts: 2352
20 Apr 2016 12:29 PM
bb


Add 25K posts
Report Abuse
Im_King is not online. Im_King
Joined: 14 May 2010
Total Posts: 2352
20 Apr 2016 05:34 PM
Bbb
Report Abuse
Developmant is not online. Developmant
Joined: 28 Feb 2013
Total Posts: 329
20 Apr 2016 05:37 PM
-- assuming the script is in the part

script.Parent.Touched:connect(function(part)
-- do stuff
end)


-- 4 8 15 16 23 42
Report Abuse
Im_King is not online. Im_King
Joined: 14 May 2010
Total Posts: 2352
20 Apr 2016 05:45 PM
So change 'part' to the name of the brick its in?
Report Abuse
Developmant is not online. Developmant
Joined: 28 Feb 2013
Total Posts: 329
20 Apr 2016 06:07 PM
yes


-- 4 8 15 16 23 42
Report Abuse
Developmant is not online. Developmant
Joined: 28 Feb 2013
Total Posts: 329
20 Apr 2016 06:07 PM
wait no, misread that, 'part' is the actual part that is touching your part with the script in it


-- 4 8 15 16 23 42
Report Abuse
Im_King is not online. Im_King
Joined: 14 May 2010
Total Posts: 2352
20 Apr 2016 07:18 PM
Development, it needs to shut off when not touching the part


Add 25K posts
Report Abuse
DivinePheonix is not online. DivinePheonix
Joined: 30 Mar 2011
Total Posts: 11190
20 Apr 2016 07:20 PM
local Touching = false
Part.Touched:connect(function()
Touching = true
while Touching do
wait()
end

Part.TouchEnded:connect(function()
Touching = false
end

Something like that
Report Abuse
butt4turd is not online. butt4turd
Joined: 01 Aug 2014
Total Posts: 5
20 Apr 2016 08:38 PM
How would I teleport A player that touches game.Workspace.tp to game.Workspace.tpother
please send me the script with all variables
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