I have a game with 3 teams( paper, rock, scissors). I want Player scissors to be able to Kill team paper but not team rock.

I want player rock to kill team scissors and not team paper.

I want player paper to kill team rock but not team scissors.

local Players = game:GetService("Players")
local Handle = script.Parent

 
local debounce = false 
 
Handle.Touched:Connect(function(hit)
	if not debounce then
		debounce = true
		if hit then
			local player = Players:GetPlayerFromCharacter(hit.Parent)
			if player.Team == game:GetService("Teams").Paper then
				player.Character.Head:remove()
			end
		end
		wait(0.5)
		debounce = false
	end
end)

5 comments

0

How is this diferent than from you last pos. About this?

0

I am trying to use the team function instead of just items to differentiate the players..i did not know about teams when i concieved that idea

0

that way things like players name is colored and spawning is taken care of automatically

0

updated if player.Team == game:GetService("Teams").Paper then

0

Oh, ok.