Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

I need a kill script to put after a function? please help

My attempt:

local UserInputService = game:GetService("UserInputService")
UserInputService.JumpRequest:Connect(function()
	  humanoid.Health = 0
	end)

Template:

local UserInputService = game:GetService("UserInputService")
UserInputService.JumpRequest:Connect(function()
	 --[the script]
	end)

1 answer

✓ Accepted answer

Define humanoid, make sure its a localscript, place it in startergui or starterplayer whatever..

repeat wait() until game.Players.LocalPlayer.Character
local hum = game.Players.LocalPlayer.Character:WaitForChild("Humanoid")

hum.Jumping:Connect(function()
	hum.Health = 0
end)

edit: untested, tell me if it doesnt work

1 comment

0

works, stonks.

This discussion is preserved as it was. New answers, comments, and votes are closed.