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: Kill onTouch?

Previous Thread :: Next Thread 
bigG123 is not online. 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 is not online. 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 is not online. 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
JonathanSwag is not online. JonathanSwag
Joined: 30 Aug 2011
Total Posts: 1012
03 Sep 2011 10:50 PM
@Nate,

ikr
Report Abuse
bigG123 is not online. 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
izzatnasruna is not online. izzatnasruna
Joined: 09 Jun 2009
Total Posts: 1927
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
JonathanSwag is not online. JonathanSwag
Joined: 30 Aug 2011
Total Posts: 1012
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
izzatnasruna is not online. izzatnasruna
Joined: 09 Jun 2009
Total Posts: 1927
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
JonathanSwag is not online. JonathanSwag
Joined: 30 Aug 2011
Total Posts: 1012
03 Sep 2011 11:14 PM
Yea..
Report Abuse
izzatnasruna is not online. izzatnasruna
Joined: 09 Jun 2009
Total Posts: 1927
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 is not online. 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
izzatnasruna is not online. izzatnasruna
Joined: 09 Jun 2009
Total Posts: 1927
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
bikerking300 is not online. bikerking300
Joined: 31 Mar 2010
Total Posts: 1034
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
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