How to get a humanoid from mouse1buttonclick

I want to get humanoid from player, I already figured out I need to use remove event and setup 2 scripts, but how do I get a humanoid from player?
I already tested, it prints out the correct player name so the script works just fine.

Server Script:

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RemoteEvent = ReplicatedStorage:WaitForChild("RemoteEvent")


RemoteEvent.OnServerEvent:Connect(function(player)
	-- kill humanoid here
end)
RemoteEvent.OnServerEvent:Connect(function(player)
	local character = player.Character
	local Humanoid = character:FindFirstChild("Humanoid")
	if Humanoid then
		Humanoid.Health = 0
	end
end)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.