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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Breath system

Previous Thread :: Next Thread 
dragonblackguo is not online. dragonblackguo
Joined: 29 Aug 2011
Total Posts: 20
02 Sep 2012 12:32 AM
Hi guys..
Im working in my place that called: Survive a Disaster in a Ship, actually im a bad scripter so i need some help, im using the water of roblox (made with plugins) so i need a breath system ( i mean when i swimming down of water i can get drown for be to much in water) that will make the game more realistic, so is you can, pliz post how to make it or will be better you give me the script :D

(sorry for bad english, since my first language not is english, you can also visit my place to see how the water work then tell me, pliz post i really need it :D)
Report Abuse
Usering is online. Usering
Joined: 18 Aug 2012
Total Posts: 10281
02 Sep 2012 12:35 AM
while true do
for _,v in pairs(game.Players:GetPlayers()) do
if v.Character.Head.CFrame.Y < 0 then v.Character.Humanoid:TakeDamage(10)
end
end
wait()
end

Thats how I would do it. idk
Report Abuse
dragonblackguo is not online. dragonblackguo
Joined: 29 Aug 2011
Total Posts: 20
02 Sep 2012 12:43 AM
-5.5, 182.6, 0.5
there the position
Report Abuse
Usering is online. Usering
Joined: 18 Aug 2012
Total Posts: 10281
02 Sep 2012 12:45 AM
ok. Now with that information, we can do this

game.Players.PlayerAdded:connect(function(player)
while true do
if player.Character.Head.Position.Y < 181 then
player.Character.Humanoid:TakeDamage(10)
else return end wait() end end)

try that. if it is killing you slowly when not in the water, just say so.
Report Abuse
dragonblackguo is not online. dragonblackguo
Joined: 29 Aug 2011
Total Posts: 20
02 Sep 2012 12:53 AM
Sorry but the script its nor working >.<
Report Abuse
Usering is online. Usering
Joined: 18 Aug 2012
Total Posts: 10281
02 Sep 2012 12:56 AM
for _,v in pairs(game.Players:GetPlayers()) do
while true do
if v.Character.Head.Position.Y < 181 then
v.Character.Humanoid:TakeDamage(10
else return print("Player isn't under 181")
end
wait()
end
end
Report Abuse
dragonblackguo is not online. dragonblackguo
Joined: 29 Aug 2011
Total Posts: 20
02 Sep 2012 01:06 AM
still not work :l
Report Abuse
dragonblackguo is not online. dragonblackguo
Joined: 29 Aug 2011
Total Posts: 20
02 Sep 2012 01:07 AM
shall we make a is you under water 15 seconds you will instant die or idk?
Report Abuse
Usering is online. Usering
Joined: 18 Aug 2012
Total Posts: 10281
02 Sep 2012 01:08 AM
If that doesn't work, then I don't know.
Report Abuse
XxChopSlaperxX is not online. XxChopSlaperxX
Joined: 09 Nov 2010
Total Posts: 3112
02 Sep 2012 01:08 AM
You forgot a ) at takedamage

NOW HELP ME AT MY THREAD@!wq@!$@#
4
Report Abuse
dragonblackguo is not online. dragonblackguo
Joined: 29 Aug 2011
Total Posts: 20
02 Sep 2012 01:11 AM
still dont work :l
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