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
 

Help here

Previous Thread :: Next Thread 
TheRealFiokoius is not online. TheRealFiokoius
Joined: 21 Jun 2011
Total Posts: 227
23 Feb 2013 02:12 PM
I'm making a script for a model to do something special:

when you walk on the black (Vent) block,the block turns red and fire comes out. Then the block kills you.

here's the script:

function onTouch(part)
local humanoid = part.Parent:FindFirstChild("Humanoid")
if humanoid then
script.Parent.BrickColor = BrickColor.new("Bright red")
Feuer = instance.new("Fire",script.Parent)
Feuer.Size = 2
Feuer.Heat = 4
humanoid.Health = 0
wait (1)
script.Parent.BrickColor = BrickColor.new("Mid gray")
Feuer:remove()
end

script.Parent.Touched:connect(onTouch)
Report Abuse
robotmega is not online. robotmega
Joined: 16 May 2009
Total Posts: 14084
23 Feb 2013 02:40 PM
function onTouch(part)
local humanoid = part.Parent:FindFirstChild("Humanoid")
if humanoid then
script.Parent.BrickColor = BrickColor.new("Bright red")
Feuer = Instance.new("Fire",script.Parent)
Feuer.Size = 2
Feuer.Heat = 4
humanoid.Health = 0
wait (1)
script.Parent.BrickColor = BrickColor.new("Mid gray")
Feuer:remove()
end
end

script.Parent.Touched:connect(onTouch)
Report Abuse
TheRealFiokoius is not online. TheRealFiokoius
Joined: 21 Jun 2011
Total Posts: 227
24 Feb 2013 09:48 PM
While that, I already found a method to make the fire come out. here it is:

function onTouch(part)
local humanoid = part.Parent:FindFirstChild("Humanoid")
if humanoid then
script.Parent.BrickColor =BrickColor.new("Bright red")
script.Parent.Fire.Enabled = true
humanoid.Health = 0
wait(1)
script.Parent.BrickColor = BrickColor.new("Mid gray")
script.Parent.Fire.Enabled = false
end
end
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