I made this script giving each player a wand(tool) but I don’t want the team ‘visitors’ to have a wand how do I make it that one team doesn’t get the wand?
The code to give the wand:
local Wand = wands[“Basic Wand”]:Clone()
Wand.Name = “Wand”
local weld = filler.Weld:Clone()
local client = filler.Client:Clone()
local md = filler.MouseDown:Clone()
local fixFlick = filler.FixFlick:Clone()
md.Parent = Wand
client.Parent = Wand
client.Disabled = false
weld.Parent = Wand
weld.Disabled = false
fixFlick.Parent = Wand
fixFlick.Disabled = false
i dont know from where u get plr, but if it dont use PlayerAdded then use:
for i, v in next, game.Players:GetPlayers() do
if v.Team == "visitors" then
else
local Wand = wands[“Basic Wand”]:Clone()
Wand.Name = “Wand”
local weld = filler.Weld:Clone()
local client = filler.Client:Clone()
local md = filler.MouseDown:Clone()
local fixFlick = filler.FixFlick:Clone()
md.Parent = Wand
client.Parent = Wand
client.Disabled = false
weld.Parent = Wand
weld.Disabled = false
fixFlick.Parent = Wand
fixFlick.Disabled = false
Wand.Parent = v.Backpack
end
end
He is getting the plr variable because he is using it in his script currently so it might not have to be used with PlayerAdded it might be from a remote or anything else.
Don’t worry he doesn’t have to we just have to go based on the variable he already has which is plr and we obviously know that equals the player in question.
You need to check if the player is in the team. So you need to get the player’s team color and see if its the Visitors team color. If it is then find the tool in their backpack and destroy it. Or you can just give precise teams the tool.