Just like the title says, what’s the best way to do a King of the Hill script? I’ve been thinking about doing a region3, or touched and touchended events. I also read somewhere that there is a method of BasePart where you can get parts that are intersecting the given part. I just looked it up and it’s BasePart::GetTouchingParts()
I am looking for something that is performant as the server has other jobs to do. The game is on a timer, so the first team to reach the goal score wins. If the timer runs out, then the team with the highest score wins.
Interesting. Due to security concerns, I don’t like using modules unless I wrote them myself. Besides, I think I have come up with a workable solution based on Region3 and touched events. The afore mention method GetTouchingParts doesn’t really work too well for this, so it’s one of the spatial query functions. I made the script as generic as I can, so it will look at the part it’s parented to, determine if it’s a square, rectange, circle, etc…, and adjust itself accordingly.