Vhakar
|
  |
| Joined: 23 Jan 2013 |
| Total Posts: 6203 |
|
|
| 16 May 2016 10:49 PM |
...after you die.
I lost the other thread. |
|
|
| Report Abuse |
|
|
| |
|
|
| 16 May 2016 10:52 PM |
"dont use free model guns" Tbh, kinda true, 90% of fm guns have afterdeath killing. The ones I use/used fell thru the map after you died, so shooting or not you were dead. |
|
|
| Report Abuse |
|
|
Vhakar
|
  |
| Joined: 23 Jan 2013 |
| Total Posts: 6203 |
|
| |
|
Vhakar
|
  |
| Joined: 23 Jan 2013 |
| Total Posts: 6203 |
|
| |
|
Theta0
|
  |
| Joined: 09 Feb 2011 |
| Total Posts: 40750 |
|
|
| 17 May 2016 07:29 PM |
add this to the firing function
if character.Humanoid.Health <= .001 then dont fire end |
|
|
| Report Abuse |
|
|
xEnforcer
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 1077 |
|
|
| 17 May 2016 07:33 PM |
assuming this is in a localscript,
local p = game.Players.LocalPlayer
if p.Character.Humanoid.Health <= 0 then
script.Parent:Destroy() -- or remove??
end |
|
|
| Report Abuse |
|
|
xEnforcer
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 1077 |
|
|
| 17 May 2016 07:34 PM |
you'd also need a loop or function, as that will run once and only once
while loops r easy enough to make, but too many of them can lag |
|
|
| Report Abuse |
|
|
ezaiahs
|
  |
| Joined: 28 Jun 2011 |
| Total Posts: 18613 |
|
| |
|
Theta0
|
  |
| Joined: 09 Feb 2011 |
| Total Posts: 40750 |
|
|
| 17 May 2016 08:57 PM |
dont listen to xEnforcer
add these lines to ur script
local plr = game.Players.LocalPlayer repeat wait() until plr.Character local humanoid = plr.Character:WaitForChild("Humanoid")
humanoid.Changed:connect(function() if humanoid.Health <= .001 then script.Parent:Destroy() end end)
|
|
|
| Report Abuse |
|
|
|
| 17 May 2016 08:59 PM |
if health less than or equal to zero then canfire=false im too lazy to put that into lua but yeah that's the jist
it's a failsafe that's easy to put in you just set your gun up so that they create a variable that acts as a failsafe, and when the variable is false the gun cannot fire. Then you make the variable true when the player is alive and false when the player has 0(or less) health |
|
|
| Report Abuse |
|
|
Isosta
|
  |
| Joined: 10 May 2015 |
| Total Posts: 14729 |
|
|
| 17 May 2016 09:00 PM |
@theta,
just do <= 0
the power of the meme ( ͡° ͜ʖ ͡°) |
|
|
| Report Abuse |
|
|
Isosta
|
  |
| Joined: 10 May 2015 |
| Total Posts: 14729 |
|
|
| 17 May 2016 09:01 PM |
the technical term is a debounce
the power of the meme ( ͡° ͜ʖ ͡°) |
|
|
| Report Abuse |
|
|
|
| 17 May 2016 09:01 PM |
@theta
Why not <=0? Removes any potential weirdness where the health is less than .001 but the player is still alive and it also makes for a more exact, quicker check. |
|
|
| Report Abuse |
|
|
xEnforcer
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 1077 |
|
|
| 17 May 2016 09:04 PM |
'dont listen to xenforcer'
my example and what I stated after it basically did what you displayed lol
>gets the player's humanoid >checks (within a function) the players health, and if it's below 0, remove it
and like the others said, it'd be much more logical to just do <= 0 rather than .001
|
|
|
| Report Abuse |
|
|
zdude3000
|
  |
| Joined: 05 May 2009 |
| Total Posts: 10834 |
|
|
| 17 May 2016 09:08 PM |
TBH
.001 or 0 seems like a minute point, so long as you dont have awkward values put in for the damage of your guns (i.e. sniper doing 99.999 damage) |
|
|
| Report Abuse |
|
|
Isosta
|
  |
| Joined: 10 May 2015 |
| Total Posts: 14729 |
|
|
| 17 May 2016 09:09 PM |
@zdude,
roblox healing heals using decimals.
>Damage >heal >more damage
.000001 health
the power of the meme ( ͡° ͜ʖ ͡°) |
|
|
| Report Abuse |
|
|
zdude3000
|
  |
| Joined: 05 May 2009 |
| Total Posts: 10834 |
|
|
| 17 May 2016 09:11 PM |
really? thats dumb
but they do them
|
|
|
| Report Abuse |
|
|
Isosta
|
  |
| Joined: 10 May 2015 |
| Total Posts: 14729 |
|
|
| 17 May 2016 09:12 PM |
And even if it is a very tiny chance, why would you not protect against it? i mean, why not? especially since it takes less characters to type anyways
the power of the meme ( ͡° ͜ʖ ͡°) |
|
|
| Report Abuse |
|
|
|
| 17 May 2016 09:13 PM |
@zdude ROBLOX healing works on a decimal/percentage basis.
Because of that if you don't place it at exactly 0 you can disable a player's gun without them actually being dead. If you set it to exactly 0, they're guaranteed to be dead when the gun is disabled. |
|
|
| Report Abuse |
|
|
Vhakar
|
  |
| Joined: 23 Jan 2013 |
| Total Posts: 6203 |
|
| |
|
Isosta
|
  |
| Joined: 10 May 2015 |
| Total Posts: 14729 |
|
|
| 17 May 2016 09:24 PM |
please tell me you changed .001 to 0
the power of the meme ( ͡° ͜ʖ ͡°) |
|
|
| Report Abuse |
|
|
Vhakar
|
  |
| Joined: 23 Jan 2013 |
| Total Posts: 6203 |
|
|
| 17 May 2016 09:31 PM |
What's wrong with having it .001?
|
|
|
| Report Abuse |
|
|
Blokov
|
  |
| Joined: 16 Dec 2015 |
| Total Posts: 1512 |
|
|
| 17 May 2016 09:35 PM |
Check changes in the Humanoid of the local player.
I think this works on FilteringEnabled and not:
game:GetService("Players").LocalPlayer.Character.Humanoid.Changed:connect(function(P) if game:GetService("Players").LocalPlayer.Character.Humanoid.Health <= 0 then script:Destroy() end end)
|
|
|
| Report Abuse |
|
|
|
| 17 May 2016 10:00 PM |
@Vhak Like we said, 0 is a simpler number and it vastly reduces the potential for glitches and bugs. ROBLOX health runs on a decimal basis so there's a (very small) chance that your guns will disable when the player hasn't fully died yet. Better cover for it than let it potentially ruin someone's experience. Another big benefit is that since 0 is simpler than 0.001, running a check each time is a lot more efficient and can lead to less net lag. |
|
|
| Report Abuse |
|
|