I want to make my code only work for one team so none of the players that are not in the specified team can use this script
The code:
function onPlayerEntered(newPlayer)
local stats = Instance.new("IntValue")
stats.Name = "leaderstats"
local cash = Instance.new("IntValue")
cash.Name = "Kaproue"
cash.Value = 10
cash.Parent = stats
stats.Parent = newPlayer
while true do
wait(60)
cash.Value = cash.Value + 5
end
end
game.Players.ChildAdded:connect(onPlayerEntered)
The script is a regular script not a local script the script adds 5 "Kaproue" or money to the player every minute, I want to make it add the money to only players in a specified team
