I'm making this script for testing and I'm having trouble figuring out how to check if the player is in group and team, but not when they joined the game.
local weapon = game.Lighting:FindFirstChild("M3 Grease Gun") game.Players.PlayerAdded:connect(function(player) if player:IsInGroup(4057855, 4057998) then if player.TeamColor == BrickColor.new("Bright red") then weapon:clone().Parent = player.Backpack end end end)
Try this:
local weapon = game.Lighting:FindFirstChild("M3 Grease Gun") game.Players.PlayerAdded:connect(function(player) if player:IsInGroup(4057855) or player:IsInGroup(4057998) then if player.TeamColor == BrickColor.new("Bright red") then weapon:clone().Parent = player.Backpack end end end)