|
|
(12 intermediate revisions by 3 users not shown) |
Line 1: |
Line 1: |
| ==Place All Comments Below Here==
| | {{delete}} |
| | |
| == Drowning ==
| |
| | |
| Drowning isn't actually very difficult. Try this script. =D
| |
| local XX = script.Parent.Position.x - (script.Parent.Size.x /2)
| |
| local Xx = XX * -1
| |
| local YY = script.Parent.Position.y - (script.Parent.Size.y / 2)
| |
| local Yy = YY * -1
| |
| local ZZ = script.Parent.Position.z - (script.Parent.Size.z /2)
| |
| local Zz = ZZ * -1
| |
| 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... --[[User:JustinP231|JustinP231]] 01:05, 4 April 2008 (CDT)
| |