bigG123
|
  |
| Joined: 17 Feb 2008 |
| Total Posts: 4117 |
|
|
| 03 Sep 2011 10:36 PM |
| I need to make a script that when you step on a brick, if you stay there for 10 seconds, kills you, but if you leave you get to live. The onlything that I can make is one that kills after 10 seconds even if you leave. |
|
|
| Report Abuse |
|
|
bigG123
|
  |
| Joined: 17 Feb 2008 |
| Total Posts: 4117 |
|
|
| 03 Sep 2011 10:44 PM |
| Maaaaaaaaaaaaaaaaaaaaaaan I thought this was supposed to be an easy script. |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 03 Sep 2011 10:49 PM |
lolno. If it was just a touch brick, I'd do it, but I don't feel like dealing with magnitude right now.
<'+1 Post. Ujelly?'> IT'S A PEAR http://www.roblox.com/Pear-Hat-item?id=60907280 |
|
|
| Report Abuse |
|
|
| |
|
bigG123
|
  |
| Joined: 17 Feb 2008 |
| Total Posts: 4117 |
|
|
| 03 Sep 2011 10:53 PM |
| Well it is a touch brick...is there more to it than that? |
|
|
| Report Abuse |
|
|
|
| 03 Sep 2011 11:05 PM |
Lulz
Player = game.Players.bigG123 MaxSeconds = 10 Seconds = 0 ExactPosition = Vector3.new(0,0,0) --Where the center of the radius Radius = 10
while true do wait() if (Player.Character.Torso.Position - ExactPosition).magnitude < Radius then coroutine.resume(coroutine.create(function() for i = 1,MaxSeconds do wait(1) Seconds = Seconds + 1 end if (Player.Character.Torso.Position - ExactPosition).magnitude < Radius then Player.Character.Torso:remove() end end)) end end |
|
|
| Report Abuse |
|
|
|
| 03 Sep 2011 11:06 PM |
Yes, but you want it to if they stay their more then 10 sec they get killed, if not, they don't..
thats kinda hard for meh ._. |
|
|
| Report Abuse |
|
|
|
| 03 Sep 2011 11:06 PM |
| Wait, you are trying to do so that, when you touch the brick and do not leave the brick's area for 10 seconds, you will get killed? |
|
|
| Report Abuse |
|
|
| |
|
|
| 03 Sep 2011 11:17 PM |
| That would be A LOT of coding, you will be need to check the CFrame and things, but the one I post is for radius, just use it if you don't want to trouble yourself coding long codes. :P |
|
|
| Report Abuse |
|
|
nate890
|
  |
| Joined: 22 Nov 2008 |
| Total Posts: 21686 |
|
|
| 03 Sep 2011 11:38 PM |
izzat, I can do it in 5 lines, I did something like it yesterday.
<'+1 Post. Ujelly?'> IT'S A PEAR http://www.roblox.com/Pear-Hat-item?id=60907280 |
|
|
| Report Abuse |
|
|
|
| 03 Sep 2011 11:40 PM |
... You can do it in a thousand lines. Printing "Hello"?
--lol --2 line --line 3 --4 lines Print([[]]..[["Hello"]]) |
|
|
| Report Abuse |
|
|
|
| 04 Sep 2011 12:38 AM |
@Iz Why not just use a For loop?
for i = 10000,0,0 do wait() print("Hi") end |
|
|
| Report Abuse |
|
|