Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do i script a bot that kills players?

Asked by 3 years ago

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

2 answers

Log in to vote
0
Answered by
3F1VE 257 Moderation Voter
3 years ago

Try using the "PathfindingService" more info about it here https://developer.roblox.com/en-us/articles/Pathfinding

Ad
Log in to vote
0
Answered by
sngnn 274 Moderation Voter
3 years ago

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)

Answer this question