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

How do I not let players attack others? [closed]

Asked by 3 years ago

I'm making a zombie game but I don't want players to attack each other. what do I do?

Closed as Not Constructive by TaxesArentAwesome and imKirda

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

2 answers

Log in to vote
0
Answered by 3 years ago
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(character)
        local humanoid = character:WaitForChild("Humanoid")
        while humanoid do
            humanoid.Health = 100000000000000000000000000000000
            wait(4)
        end
    end)
end)

this might work it gives players alot of hp that nothing could kill them im not sure the script works thoe

Ad
Log in to vote
0
Answered by 3 years ago

Could you be more specific?

0
i want the players to attack the enemies but not each other Dinowood49 -5 — 3y