#how can i make a safezone?

10 messages · Page 1 of 1 (latest)

maiden token
#

im making a sword fighting game and im making a sort of lobby area. im relatively new to scripting, if u can help id appreciate it

#

basically an area where u get a forcefield

ocean galleon
#

if youre ok with the safesone being circular you can check for the distance from a point and a player, and when the player is hit, check if the distance is less than the radius of the safezone (use (Vector - Vector).Magnitude to get distance ). or if u want the safezone to be a cuboid u can use region3 or something similar

#

local distance = ( player.Character.PrimaryPart.Position - Safezone.Position ).Magnitude

#

and then while damaging, check if its less than a set radius.

violet solstice
#

use region3

maiden token
#

thank you!

supple meteor
#

I think you can use region3 to check if a player is in the safezone

#

In case he is, then depending what you need you can modify your combat system so players cant deal/take damage

#

or give them 9999 health or something like that