A little bit of backstory. My game includes maps that are shaped as hexagons. Players in the map fight to the death while people spectate around the map. Currently, at certain intervals, the border increases in size, hurting people in the “storm”. The border is shaped the same as the map and uses the
.TouchEnded events to detect when the player’s character is in the border.
But here is the problem. the
.TouchEnded events are very unreliable, as sometimes the
.TouchEnded event would fire while the player’s humanoid root part is still in the border. Overall,
.Touched should be avoided because of it relying on the player. I have tried to use alternatives that I know and I have looked up on the form, but the solutions I have tried do not work with the border shape.
From what I saw from other form posts and the Battle Royal game Roblox released free to use, most “storms” use
.Magnitude. I would see why someone would use magnitude as it is a really good way to find player’s distance from the center of the border and the player, but I cannot use the same method for my map because of its hexagonal shape (aka not spherical).
Another method is to break up the individual parts of the border and to use
:FindPartsInRegion3to find the player. The thing is, Region3 can only find parts in a “box” shape with 2 positions. My border is hexagonal, most parts would have an orientation. This method would only work for a portion of the border. This cannot work for me.
I know there is most likely way to find the player’s position using fancy math but as this is just supposed to be very simple project, I am trying to find out if there is any other options, possibly what others used.
I do not know if I am glossing over anything as I am still learning, but I was wondering if there is any other way to find the players in the border. For now, I stick to
Please let me know if you don’t understand something or if something is inaccurate.
Yes, I do know I have already made this topic awhile ago, but accidentally sent a blank form. Opps!
I have deleted it right when I sent it. If there is anything I can do about it let me know. Thanks!