User talk:Lolzy: Difference between revisions
From Legacy Roblox Wiki
Jump to navigationJump to search
>JustinP231 |
>JustinP231 |
||
Line 4: | Line 4: | ||
Drowning isn't actually very difficult. Try this script. =D | Drowning isn't actually very difficult. Try this script. =D | ||
local XX = script.Parent.Position.x - (script.Parent.Size.x /2) | local XX = script.Parent.Position.x - (script.Parent.Size.x / 2) | ||
local Xx = | local Xx = script.Parent.Position.x + (script.Parent.Size.x / 2) | ||
local YY = script.Parent.Position.y - (script.Parent.Size.y / 2) | local YY = script.Parent.Position.y - (script.Parent.Size.y / 2) | ||
local Yy = | local Yy = script.Parent.Position.y + (script.Parent.Size.y / 2) | ||
local ZZ = script.Parent.Position.z - (script.Parent.Size.z /2) | local ZZ = script.Parent.Position.z - (script.Parent.Size.z / 2) | ||
local Zz = | local Zz = script.Parent.Position.z + (script.Parent.Size.z / 2) | ||
local Drown = 2 -- How often they will take damage if underwater (in seconds). | local Drown = 2 -- How often they will take damage if underwater (in seconds). | ||
local damage = 10 -- How much damage they receive each time. | local damage = 10 -- How much damage they receive each time. | ||
Line 33: | Line 33: | ||
Okay... Maybe that wasn't so simple... Ah well. Place that into a water brick. But, it probably won't work if you rotate or tilt the brick, so don't do it! Test it for me and lemme know if it works... --[[User:JustinP231|JustinP231]] 01:05, 4 April 2008 (CDT) | Okay... Maybe that wasn't so simple... Ah well. Place that into a water brick. But, it probably won't work if you rotate or tilt the brick, so don't do it! Test it for me and lemme know if it works... --[[User:JustinP231|JustinP231]] 01:05, 4 April 2008 (CDT) | ||
Er... Hang on. I messed up... --[[User:JustinP231|JustinP231]] 01:31, 4 April 2008 (CDT) | Er... Hang on. I messed up... --[[User:JustinP231|JustinP231]] 01:31, 4 April 2008 (CDT) | ||
::::There! That should work now. =D Remember, no turning or tilting your "Water", ok? If you must, then make sure it's a perfect square... --[[User:JustinP231|JustinP231]] 01:35, 4 April 2008 (CDT) |
Revision as of 06:35, 4 April 2008
Place All Comments Below Here
Drowning
Drowning isn't actually very difficult. Try this script. =D
local XX = script.Parent.Position.x - (script.Parent.Size.x / 2) local Xx = script.Parent.Position.x + (script.Parent.Size.x / 2) local YY = script.Parent.Position.y - (script.Parent.Size.y / 2) local Yy = script.Parent.Position.y + (script.Parent.Size.y / 2) local ZZ = script.Parent.Position.z - (script.Parent.Size.z / 2) local Zz = script.Parent.Position.z + (script.Parent.Size.z / 2) local Drown = 2 -- How often they will take damage if underwater (in seconds). local damage = 10 -- How much damage they receive each time. while true do wait(Drown) local P = game.Players:GetChildren() for i = 1, #P do if P[i].Character:findFirstChild("Head") ~= nil then local X = P[i].Character.Head.Position.x local Y = P[i].Character.Head.Position.y local Z = P[i].Character.Head.Position.z if X > XX and X < Xx then if Y > YY and Y < Yy then if Z > ZZ and Z < Zz then P[i].Character.Humanoid.Health = P[i].Character.Humanoid.Health - damage end end end end end end
Okay... Maybe that wasn't so simple... Ah well. Place that into a water brick. But, it probably won't work if you rotate or tilt the brick, so don't do it! Test it for me and lemme know if it works... --JustinP231 01:05, 4 April 2008 (CDT) Er... Hang on. I messed up... --JustinP231 01:31, 4 April 2008 (CDT)
- There! That should work now. =D Remember, no turning or tilting your "Water", ok? If you must, then make sure it's a perfect square... --JustinP231 01:35, 4 April 2008 (CDT)