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
 

I need help with a script

Previous Thread :: Next Thread 
dustyshirt is not online. dustyshirt
Joined: 15 Jan 2012
Total Posts: 15431
25 Feb 2014 03:47 PM
i have this :

script.Parent.Touched:connect(function(hit) --Touched Event
if hit.Parent:FindFirstChild("Humanoid") ~= nil then --Seeing if touch is a humanoid
for i = 1, 10, 1 do --For loop
script.Parent.Transparency = i/10 --Setting the part's property to the fo loop variable
end end end) --end for for loop, end for if statement, end) for function

But I want the brick to come back after 5 seconds, can somebody modify this for me?

im under your bed
Report Abuse
Avorable is not online. Avorable
Joined: 05 Jan 2014
Total Posts: 847
25 Feb 2014 03:48 PM
script.Parent.Touched:connect(function(hit) --Touched Event
if hit.Parent:FindFirstChild("Humanoid") ~= nil then --Seeing if touch is a humanoid
for i = 1, 10, 1 do --For loop
script.Parent.Transparency = i/10 --Setting the part's property to the fo loop variable
end end

wait(5)
script.Parent.Transparency = 0

end) --end for for loop, end for if statement, end) for function

Report Abuse
dustyshirt is not online. dustyshirt
Joined: 15 Jan 2012
Total Posts: 15431
25 Feb 2014 03:49 PM
thank you!

im under your bed
Report Abuse
dustyshirt is not online. dustyshirt
Joined: 15 Jan 2012
Total Posts: 15431
25 Feb 2014 03:54 PM
Actually that broke the script completely

im under your bed
Report Abuse
Avorable is not online. Avorable
Joined: 05 Jan 2014
Total Posts: 847
25 Feb 2014 04:03 PM
The script wasn't going to work to begin with.
You don't have a blocker so it'll rapidly fire when it's touched.
Report Abuse
dustyshirt is not online. dustyshirt
Joined: 15 Jan 2012
Total Posts: 15431
25 Feb 2014 04:26 PM
Then why'd you reply and not tell me the problem?

im under your bed
Report Abuse
IAmThe0nly0ne is not online. IAmThe0nly0ne
Joined: 01 Feb 2014
Total Posts: 770
25 Feb 2014 05:19 PM
Use debounce...
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