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 » Scripters
Home Search
 

Re: While true do kill onTouch?

Previous Thread :: Next Thread 
RoyalCheweez is not online. RoyalCheweez
Joined: 01 Jan 2015
Total Posts: 125
31 Jul 2017 11:21 AM
Ive Been trying for hours, is this even possible? And if so, please help. Im A New developer and in need of this help.
Report Abuse
Unsubtleties is not online. Unsubtleties
Joined: 28 Nov 2016
Total Posts: 9203
31 Jul 2017 11:25 AM
The title makes no sense.


Report Abuse
LaeMVP is online. LaeMVP
Joined: 24 Jun 2013
Total Posts: 4416
31 Jul 2017 11:26 AM
Are you trying to make a recursive function?
Report Abuse
Vinny_Zero is not online. Vinny_Zero
Joined: 12 May 2014
Total Posts: 107
31 Jul 2017 11:37 AM
local KillTouch = script.Parent

local function PlayerTouched(Part)
local Parent = Part.Parent
if game.Players:GetPlayerFromCharacter(Parent) then
Parent.Humanoid.Health = 0
end
end

KillTouch.Touched:connect(PlayerTouched)
Report Abuse
RoyalCheweez is not online. RoyalCheweez
Joined: 01 Jan 2015
Total Posts: 125
31 Jul 2017 01:51 PM
Im Trying to make a while true do script kill a player when touching a specific brick and the value is true, the value name is Kill
Report Abuse
RoyalCheweez is not online. RoyalCheweez
Joined: 01 Jan 2015
Total Posts: 125
31 Jul 2017 01:52 PM
And it's not a local script, just a script.
Report Abuse
Mitko0o1 is not online. Mitko0o1
Joined: 30 Nov 2010
Total Posts: 5725
31 Jul 2017 01:53 PM
You have events for this reason, no need of while loop. Place Vinny's script inside the part you want and try it.


Report Abuse
RoyalCheweez is not online. RoyalCheweez
Joined: 01 Jan 2015
Total Posts: 125
31 Jul 2017 02:27 PM
Ill Try that.
Report Abuse
RoyalCheweez is not online. RoyalCheweez
Joined: 01 Jan 2015
Total Posts: 125
31 Jul 2017 02:31 PM
Just tried it, it doesn't work for what I'm doing. Im Planning on making a script that on the touch of the script's parent (Which is a brick), It would kill them if the value named "Kill" is true. Thanks in advance.
Report Abuse
Rinem is online. Rinem
Joined: 05 Jan 2014
Total Posts: 255
31 Jul 2017 02:34 PM
local KillTouch = script.Parent

local function PlayerTouched(Part)
local Parent = Part.Parent
if game.Players:GetPlayerFromCharacter(Parent) and kill == true then --//change 'kill' to whatever your value is
Parent.Humanoid.Health = 0
end
end

KillTouch.Touched:connect(PlayerTouched)


dabbin' on the haters
Report Abuse
LittleFruitCake is not online. LittleFruitCake
Joined: 17 May 2013
Total Posts: 802
31 Jul 2017 02:34 PM
im confused
Report Abuse
RoyalCheweez is not online. RoyalCheweez
Joined: 01 Jan 2015
Total Posts: 125
31 Jul 2017 02:40 PM
It Still didn't work! UGHHHHHHHHHHHHHH! I Need it to kill when the value is true, and the value name is "Kill"
Report Abuse
RoyalCheweez is not online. RoyalCheweez
Joined: 01 Jan 2015
Total Posts: 125
01 Aug 2017 03:33 PM
Bump
Report Abuse
Sweegz is online. Sweegz
Joined: 08 Apr 2013
Total Posts: 519
01 Aug 2017 03:42 PM
Just add && if value == true


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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