Hi all,
I was just curious on how one could detect when a player is on a specific team. In my game, I have this short chunk of code that’s supposed to detect if a player is on a team, but the line if v.Team == "Playing" doesn’t work, even though “playing” is a team, so if anyone could correct my code so it works, it would be massively appreciated. Thanks in advance!
--Flashlight is a tool
local serverStorage = game.getService("ServerStorage")
while true do
for i,v in pairs(game.Players:GetChildren()) do
if v.Team == "Playing" then
flashLightCopy = serverStorage.Flashlight:Clone()
flashLightCopy = v.Backpack
print("test2")
end
print(v.Team)
print(game.Teams.Playing)
end
task.wait(0.1)
end