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

how do i give gears to a team i want?

Asked by 5 years ago

So there's a team called Red and Blue , Red have Sword, Blue have Gun, so , how do i do that?

1 answer

Log in to vote
0
Answered by 5 years ago
Edited 5 years ago

Put the weapons in ServerStorage, call the gun "Gun", and the sword "Sword", then try this. Put the script in ServerScriptService.

game.Players.PlayerAdded:Connect(function(plr)
    plr.CharacterAdded:Connect(function(char)
        if plr.Team = game.Teams.Red then
            local sword = game.ServerStorage:FindFirstChild("Sword")
            sword.Parent = plr.Backpack
        elseif plr.Team == game.Teams.Blue then
            local gun = game.ServerStorage:FindFirstChild("Gun")
            gun.Parent = plr.Backpack
        end
    end
end)
1
that wont work.. always, because maybe he has a game where they stay at a neutral team at the begining and then switch teams! mdbaten2 24 — 5y
0
Good point MachoPiggies 526 — 5y
0
I have an auto switch team for group members, but there's a neutral team where people are cillivan , how do i fix that? Hi_ImNoob1 53 — 5y
Ad

Answer this question