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: Help??

Previous Thread :: Next Thread 
sniperjackson678 is not online. sniperjackson678
Joined: 25 Aug 2012
Total Posts: 60
18 Jul 2017 11:05 AM
How would I make it so if any of my limbs where touched they would die ?

local touch
touch = char["Rigt Leg"].Touched:connect(function(hit)
if not hit.Parent:findFirstChild("Humanoid") then return end
hit.Parent.Humanoid.Health = 0
wait(3)
touch:disconnect()
Report Abuse
sniperjackson678 is not online. sniperjackson678
Joined: 25 Aug 2012
Total Posts: 60
18 Jul 2017 11:10 AM
would i use get children or something?
Report Abuse
iiNemo is online. iiNemo
Joined: 22 Jul 2013
Total Posts: 2380
18 Jul 2017 11:12 AM
local touch
touch = char["Rigt Leg"].Touched:connect(function(hit)
if not hit.Parent:findFirstChild("Humanoid") then return end
hit.Parent.Humanoid.Health = 0
wait(3)
touch:disconnect()

script.Parent.Part.Touched:Connect(function(Hit)
if Hit.Parent:FindFirstChildOfClass('Humanoid') and Hit.Parent:FindFirstChildOfClass('Humanoid').Health ~= 0 then
Hit.Parent:FindFirstChildOfClass('Humanoid').Health = 0
end
end)
Report Abuse
sniperjackson678 is not online. sniperjackson678
Joined: 25 Aug 2012
Total Posts: 60
18 Jul 2017 11:14 AM
It's not a part i want it's all my limbs if they're touched then they die ?
Report Abuse
iiNemo is online. iiNemo
Joined: 22 Jul 2013
Total Posts: 2380
18 Jul 2017 11:15 AM
script.Parent.Part.Touched:Connect(function(Hit)
if Hit.Parent:FindFirstChildOfClass('Humanoid') and Hit.Parent:FindFirstChildOfClass('Humanoid').Health ~= 0 then
Hit.Parent:FindFirstChildOfClass('Humanoid').Health = 0
end
end)

Part meaning, the object that has to be touched in order for the player to die.
Report Abuse
sniperjackson678 is not online. sniperjackson678
Joined: 25 Aug 2012
Total Posts: 60
18 Jul 2017 11:17 AM
Yes but i dont have a part in it i just want it to kill when it touches my any of my limbs but thats just a part
Report Abuse
sniperjackson678 is not online. sniperjackson678
Joined: 25 Aug 2012
Total Posts: 60
18 Jul 2017 11:20 AM
Like how would i make so if it touches any of my limbs it dies. not just the right arm or a part
Report Abuse
iiNemo is online. iiNemo
Joined: 22 Jul 2013
Total Posts: 2380
18 Jul 2017 11:21 AM
If the player, any part of there limbs get touched by the part then they will die, maybe you should try testing it before saying it doesn't work. Also, your saying if the limb is touched, touched by what? The part in my thing I made, is the part that has to be touched in order for the player to die.
Report Abuse
FastMaxF1 is not online. FastMaxF1
Joined: 15 Aug 2015
Total Posts: 23
18 Jul 2017 11:22 AM
Just find a kill brick model, Much easier.
Report Abuse
sniperjackson678 is not online. sniperjackson678
Joined: 25 Aug 2012
Total Posts: 60
18 Jul 2017 11:23 AM
noo i mean if any one of my limbs are touched then they die any one of my limbs are touched by a player
Report Abuse
sniperjackson678 is not online. sniperjackson678
Joined: 25 Aug 2012
Total Posts: 60
18 Jul 2017 11:26 AM
anyone?
Report Abuse
iiNemo is online. iiNemo
Joined: 22 Jul 2013
Total Posts: 2380
18 Jul 2017 11:27 AM
Wait so u want to make it so if the player is touched by another player then both players would die?
Report Abuse
sniperjackson678 is not online. sniperjackson678
Joined: 25 Aug 2012
Total Posts: 60
18 Jul 2017 11:28 AM
I made a script to my myself big now i want to make it so if any one of My limbs are touched the player dies not just the right leg or torso everyone
Report Abuse
iiNemo is online. iiNemo
Joined: 22 Jul 2013
Total Posts: 2380
18 Jul 2017 11:29 AM
If the limbs are touched by what?
Report Abuse
sniperjackson678 is not online. sniperjackson678
Joined: 25 Aug 2012
Total Posts: 60
18 Jul 2017 11:29 AM
by a player
Report Abuse
iiNemo is online. iiNemo
Joined: 22 Jul 2013
Total Posts: 2380
18 Jul 2017 11:35 AM
game.Players.PlayerAdded:Connect(function(Player)
Player.Character.CharacterAdded:Connect(function(Char)
for _, v in pairs (Char:GetChildren()) do
v.Touched:Connect(function(Hit)
if Hit.Parent:FindFirstChildOfClass('Humanoid') and Hit.Parent:FindFirstChildOfClass('Humanoid').Health ~= 0 then
Hit.Parent:FindFirstChildOfClass('Humanoid').Health = 0
Char:FindFirstChildOfClass('Humanoid').Health = 0
end
end)
end
end)

If 1 player touches another player then both players would die..
Report Abuse
sniperjackson678 is not online. sniperjackson678
Joined: 25 Aug 2012
Total Posts: 60
18 Jul 2017 11:43 AM
i think i only need this how would i end it?

mouse.KeyDown:Connect(function(Key)
if Key == "c" then
anRoar:Play()
mad:Play()
local tou
for _, v in pairs (Char:GetChildren()) do
tou = v.Touched:Connect(function(Hit)
if Hit.Parent:FindFirstChildOfClass('Humanoid') and Hit.Parent:FindFirstChildOfClass('Humanoid').Health ~= 0 then
Hit.Parent:FindFirstChildOfClass('Humanoid').Health = 0
Char:FindFirstChildOfClass('Humanoid').Health = 0
wait(3)
tou:disconnect()
Report Abuse
iiNemo is online. iiNemo
Joined: 22 Jul 2013
Total Posts: 2380
18 Jul 2017 11:44 AM
I just told u what to do, put my exact script into the workspace with a server script. Also in the startergui put a localscript using this..

game:GetService('UserInputService').InputBegan:Connect(function(Input)
if Input.KeyCode == Enum.KeyCode.C then
-- Whatever u want to happen when u press C
end
end)
Report Abuse
sniperjackson678 is not online. sniperjackson678
Joined: 25 Aug 2012
Total Posts: 60
18 Jul 2017 11:47 AM
I tried your way i still cant close the function

game:GetService('UserInputService').InputBegan:Connect(function(Input)
if Input.KeyCode == Enum.KeyCode.C then
anRoar:Play()
mad:Play()
local tou
for _, v in pairs (Char:GetChildren()) do
tou = v.Touched:Connect(function(Hit)
if Hit.Parent:FindFirstChildOfClass('Humanoid') and Hit.Parent:FindFirstChildOfClass('Humanoid').Health ~= 0 then
Hit.Parent:FindFirstChildOfClass('Humanoid').Health = 0
Char:FindFirstChildOfClass('Humanoid').Health =
wait(3)
tou:disconnect()
end
end)
end
end)
Report Abuse
sniperjackson678 is not online. sniperjackson678
Joined: 25 Aug 2012
Total Posts: 60
18 Jul 2017 11:48 AM
and i added these game.Players.PlayerAdded:Connect(function(Player)
Player.Character.CharacterAdded:Connect(function(Char)
Report Abuse
iiNemo is online. iiNemo
Joined: 22 Jul 2013
Total Posts: 2380
18 Jul 2017 11:50 AM
I said you have to put the userinput service in the startergui in a local script andn the touched function in a server script in the workspace, both separate..
Report Abuse
sniperjackson678 is not online. sniperjackson678
Joined: 25 Aug 2012
Total Posts: 60
18 Jul 2017 11:57 AM
Ok i'll do that after but how do i close it first?
Report Abuse
iiNemo is online. iiNemo
Joined: 22 Jul 2013
Total Posts: 2380
18 Jul 2017 11:57 AM
*facepalm*
Report Abuse
sniperjackson678 is not online. sniperjackson678
Joined: 25 Aug 2012
Total Posts: 60
18 Jul 2017 11:58 AM
so are you gonna tell me or no
Report Abuse
sniperjackson678 is not online. sniperjackson678
Joined: 25 Aug 2012
Total Posts: 60
18 Jul 2017 12:16 PM
thanks for nothing
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