So I've made a script that works along with my Datastore but I'm getting a error called WinningTeamName is not a valid member of Teams.
local teams = game:GetService("Teams")
game.ServerStorage.PlayerWin.Event:Connect(function()
local WinningTeam = script.WinningTeam.Value
local WinningTeamName = teams:FindFirstChild(WinningTeam)
local WinningPlayers = teams.WinningTeamName:GetPlayers()
for _, Player in pairs(teams[WinningTeamName]:GetPlayers()) do
local User = Player.UserId
local PlayerData = game.ServerStorage:FindFirstChild(User)
PlayerData.ELO.Value = PlayerData.ELO.Value + 10
end
end)

2 comments
Use '[' not '{'. So do "teams[WinningTeamName]" on line 09
@Troxure. I tried that but it didnt work