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

Reset character pressing keybind "Y"?

im looking around for a script can reset character pressing "Y" but i didn't find it anywere,i need help..

1 answer

✓ Accepted answer

You can do this easily. Put this script in a local script inside StarterCharacterScripts

local plr = game.Players.LocalPlayer
local player = script.Parent

plr:GetMouse().KeyDown:Connect(function(K)
	if K == "y" then
		player.Humanoid.Health = 0
	end
end)

4 comments

0

thanks!!

0

Don't use deprecated methods.

0

Use UserInputService instead.

0

It could be both

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