|
| 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 |
|
|
|
| 18 Jul 2017 11:10 AM |
| would i use get children or something? |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| 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
|
  |
| Joined: 15 Aug 2015 |
| Total Posts: 23 |
|
|
| 18 Jul 2017 11:22 AM |
| Just find a kill brick model, Much easier. |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
| |
|
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 |
|
|
|
| 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
|
  |
| Joined: 22 Jul 2013 |
| Total Posts: 2380 |
|
|
| 18 Jul 2017 11:29 AM |
| If the limbs are touched by what? |
|
|
| Report Abuse |
|
|
| |
|
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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 18 Jul 2017 11:57 AM |
| Ok i'll do that after but how do i close it first? |
|
|
| Report Abuse |
|
|
iiNemo
|
  |
| Joined: 22 Jul 2013 |
| Total Posts: 2380 |
|
| |
|
|
| 18 Jul 2017 11:58 AM |
| so are you gonna tell me or no |
|
|
| Report Abuse |
|
|
| |
|