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

How To Disable Player Vs Player But Still Do And Take Damage From NPC's? [closed]

Asked by 4 years ago

This would be greatly appreciated if anyone could help. I also would need to know where to put the script (If Needed). So if anyone could help me thank you.

0
I was wondering the same thing. kodakpro87 7 — 4y

Closed as Not Constructive by Brandon1881, JesseSong, and jediplocoon

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 4 years ago

https://scriptinghelpers.org/questions/35875/how-to-disable-pvp-but-still-be-able-to-kill-zombies

Ad
Log in to vote
0
Answered by
Zero_Tsou 175
4 years ago

Just make a CanPVP bool value, if it is set to true pvp will be disabled ( player wont get damage by any other player)

-------- ur function
local CanPVP = script.Parent:WaitForChild("CanPVP")

if CanPVP.Value == true then
------ damage

else 

---- damage = 0