Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

3 team kill tag. Basically Rock, Paper Scissors in tag form? Please keep it simple as possible :)

Asked by 4 years ago
Edited 4 years ago

--I am using the Team service to create 3 teams: Blue for scissors, brown for rock, and white for paper.

--when a blue player (scissors) touches a brown player (rock) his head is removed

--the problem i am having is that when my blue player touches a brown player they are both dying

--I am open to suggestions for other ways to do this...maybe its very simple using the TEAMS service?

--the below script is the child of a tool scissors handle that each scissors player gets. I am puting the script as a child of TOOL>HANDLE

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 and player.TeamColor == BrickColor.new("Brown") then

player.Character.Head:remove()

end

end

wait(0.5)

debounce = false

end

end)

Answer this question