Hi guys! How can I disable PVP on my game? So the player can kill zombies, but can’t kill / damage players.
You can check if the thing the person is hitting is a player.
if ThingThatPlayerIsHitting.Parent:FindFirstChild("Humanoid") and game.Players:FindFirstChild(ThingThatPlayerIsHitting.Parent.Name) then
-- They are hitting a player, so don't do damage here
else
-- They are hitting an NPC, do damage
end
7 Likes