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

How to kill another player from a specific team?

Asked by 4 years ago
Edited by theking48989987 4 years ago

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)
0
How is this diferent than from you last pos. About this? Farsalis 369 — 4y
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 BricBash3r 2 — 4y
0
that way things like players name is colored and spawning is taken care of automatically BricBash3r 2 — 4y
0
updated if player.Team == game:GetService("Teams").Paper then BricBash3r 2 — 4y
0
Oh, ok. Farsalis 369 — 4y

Answer this question