Hello Trying To Make A Tagging System Where if you’re on a certain piece of land you can tag other teams but if you’re on their land you can get tagged by them.
Tagged basically means getting killed
ALL HELP IS APPRECIATED PLEASE
Pardon, but i fixed up your message.
Hello, I’m trying to make a tagging system, Where if you’re on a certain piece of land you can tag other teams, but if you’re on their land, you can get tagged by them.
Tagged basically means getting killed. If i fixed anything wrong let me know
HELP IS APPRECIATED
For checking if the player is on a team’s side, you can use workspace:GetPartsInPart(Part)
.
For this example below, you will need two parts named “RedTeam”, and “BlueTeam” in workspace with collison off.
-- checkTeam(Player) will return a string. That string can be "RedTeam" or "BlueTeam", if they are not in a teamZone then it will return "UnknownTeam'
function checkTeam(Player)
local newOverlap = OverlapParams.new()
newOverlap.FilterType = Enum.RaycastFilterType.Whitelist
newOverlap.FilterDescendantsInstances = {Player.Character}
local redTeam = workspace:GetPartsInPart(workspace.TeamRed,newOverlap)
local blueTeam = workspace:GetPartsInPart(workspace.TeamBlue,newOverlap)
if #redTeam ~= 0 then
return 'RedTeam'
end
if #blueTeam ~= 0 then
return 'BlueTeam'
end
return 'UnknownTeam'
end
You can setup the function to loop when a player is added to the game/server, or add it to whatever you are using to tag/kill them (like a tool when they click).
If you want to see the baseplate I was using to test this here:
TaggingSystem_Testing.rbxl (52.7 KB)
Thanks So Much For The Help! Will Try It