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: Fire

Previous Thread :: Next Thread 
ewewew35 is not online. ewewew35
Joined: 21 Mar 2010
Total Posts: 93
15 Sep 2014 08:05 PM
can you make it so that when you're in a fire it damages you slowly? like takes off 5% of your life every second?
Report Abuse
cooldude999921 is not online. cooldude999921
Joined: 13 Aug 2011
Total Posts: 3702
15 Sep 2014 08:10 PM
-- localscript in starterGui


plr = game.Players.LocalPlayer
char = plr.Character

for _,v in pairs(plr:GetChildren()) do
if v:IsA("BasePart") then
v.ChildAdded:connect(function(child)
if child:IsA("Fire") then
coroutine.resume(coroutine.create(function(dam)
for i = 1, math.random(20, 35) do
wait(1)
char.Humanoid:TakeDamage(math.random(1, 3))
end
end))

else
print(script:GetFullName()..": Attempted to index "..child.." as a fire object")
end
end)
end
end
Report Abuse
cooldude999921 is not online. cooldude999921
Joined: 13 Aug 2011
Total Posts: 3702
15 Sep 2014 08:11 PM
Burns a character for a random set of seconds between 20 and 35.

Damages a character every second randomly from 1 and 3 damage
Report Abuse
ewewew35 is not online. ewewew35
Joined: 21 Mar 2010
Total Posts: 93
15 Sep 2014 08:24 PM
is there a way to only make it for 1 fire?
Report Abuse
ewewew35 is not online. ewewew35
Joined: 21 Mar 2010
Total Posts: 93
15 Sep 2014 08:40 PM
bump
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