Someone make something that kills you if you are say below 20 health (like if you’re getting shot, to keep from getting the other person points you kill yourself)
ihatemylife = CreateClientConVar(“emohealth”, “20”, true, false)
if LocalPlayer():Health() < ihatemylife then
I made so much lol in my pants
Messily coded because I did it in the reply window.
Ok someone fix it plz cuz it don’t work.
it should work, whats the error your getting?
local ihatemylife = CreateClientConVar(“emohealth”, 20, true, false)
hook.Add(“Think”, “SuicideHealthCheckThink”, function()
if LocalPlayer():Alive() && LocalPlayer():Health() < ihatemylife:GetInt() then
CreateClientConVar returns a ConVar object, to get the value of it you have to use ConVar.GetString/Int/Float/Bool().
Oops… yeah, didn’t see that.
Anyway, my code works definitely, I tried it.
FlapJack fixed it and I assume thats the code he used and got the error with.