so im trying to give the player money every 5 minutes via the server so it will save.
This is the error i get: 19:00:28.220 ServerScriptService.Leaderboard:26: attempt to index nil with 'Team' - Server - Leaderboard:26
this is the script i use:
local Player = game:GetService("Players").LocalPlayer
local Teams = game:GetService("Teams")
while wait(300) do
if Player.Team == Teams.Citizen then
game.Players.LocalPlayer.Leaderboard.Money.Value = game.Players.LocalPlayer.Leaderboard.Money.Value + 10
end
end

2 comments
The error is that with "Player.Team.Name" there is a error: Attempt to index nil with Team
then maybe do the teamcolor instead of the name, like if Player.Team.TeamColor == "Color" then