• Hey! Register here to create your account, engage with the community, and talk about what is new!

How to add a no PvP period so people can actually escape spawn.

realRoforbYT

Forum adept
Joined
Oct 6, 2020
Messages
254
Reaction score
31
It's super simple. The code needed is
When Player Joins > Turn off PvP > Wait [insert number value here] > Turn on PvP
Then do this code
When Player Respawns > Turn off PvP > Wait [insert number value here] > Turn on PvP
That's it. We don't use invincibility frames because that occurs every single time you need to give the player invincibility.
 

silvxrcat

New member
Joined
Feb 9, 2021
Messages
15
Reaction score
5
Or, do the same thing but using l o c a t i o n s. Just use an If Player (Is Near Location) and you can set how many blocks as a radius your spawn is. Now, using an else at the end, turn on and off PvP accordingly.
 

realRoforbYT

Forum adept
Joined
Oct 6, 2020
Messages
254
Reaction score
31
Or, do the same thing but using l o c a t i o n s. Just use an If Player (Is Near Location) and you can set how many blocks as a radius your spawn is. Now, using an else at the end, turn on and off PvP accordingly.
It kinda ruins the point. They need to exit spawn to get items but can be easily killed that way. So why not just add a cool down instead.
 
Top Bottom