GOAL: When a player says “stick”, if they are in Blue team, they get a stick. Otherwise nothing happens.
CODE:
local stick = game.Lighting.StunStick
game.Players.PlayerAdded:Connect(function(player)
player.Chatted:Connect(function(message)
if message:lower() == "stick" then
if player.Team == "Blue" then
stick:Clone().Parent = player.Backpack
elseif player.Team ~= "Blue" then
print("silly, you are not blue team")
end
end
end)
end)
ISSUE: I am in blue team but my stick is not showing up and it says that I am not in the team.
This is my output: