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

How do i script a bot that kills players?

I want to make a bot that kills players but how do i do it?

2 answers

This is not a request site. However, I could link pages to help.

First, you'd use PathfindingService to make the bot follow the player.

Next, (and last) you need to make the bot damage the player; this can be done via combining .Touched and :TakeDamage.

--Damaging part example
HumanoidRootPart.Touched:Connect(function(object)
	if object.Parent:FindFirstChild("Humanoid") then
		local player = object.Parent
		player.Humanoid:TakeDamage(100)
	end
end)

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