✓ Accepted answer
Run a loop through the players that are on the point and do a team check.
You can get the player's team through the player object.
Lets say you want the point to be contested if one player from a different team is on it. This is quite simple since you need to check if all players on the point are on the same team.
local playersOnPoint = {}
local teamOnPoint = playersOnPoint[1].Team
for i=1, #playersOnPoint do
local player = playersOnPoint[i]
if (player.Team ~= teamOnPoint) then
end
end
Make this a function and you can check and apply the ownership of the point.
If you want the team with the most players on the point to capture it, store a table of teams on the point and assign them numbers. Determine which time is more prominent and apply ownership.
Good luck.
1 comment
Id would look into using magnitude and using collectionservice or just the teamservice to determine which teams are on the capture point