local playerStats = {} --this keeps a list of the stats for each player that enters the game game.Players.PlayerAdded:connect(function(player) local leaderstats = Instance.new("Model", player) leaderstats.Name = "leaderstats" local grouprank = Instance.new("StringValue", leaderstats) grouprank.Name = "Rank" local rank = player:GetRoleInGroup(1070236) -- Insert the group ID for whatever group you want ranks displayed for here. if rank ~= 0 then grouprank.Value = rank else grouprank.Value = "Join U.F.P." end playerStats[player] = leaderstats end) local playerstats = {} game.Players.PlayerAdded:connect (function (player) local leaderstats = Instance.new("Model", player) leaderstats.Name = "Allies" end local playerstats = {} game.Players.PlayerAdded:connect(function(player) local leaderstats = Instance.new("Model", player) leaderstats.Name = "Enemy" end
But my question is... It says ')' expected (to close '('at line 22) near 'local' But when I do it line 22 gets underlined red and it says '(' expected near ')' What do I do?
local playerStats = {} --this keeps a list of the stats for each player that enters the game game.Players.PlayerAdded:connect(function(player) local leaderstats = Instance.new("Model", player) leaderstats.Name = "leaderstats" local grouprank = Instance.new("StringValue", leaderstats) grouprank.Name = "Rank" local rank = player:GetRoleInGroup(1070236) -- Insert the group ID for whatever group you want ranks displayed for here. if rank ~= 0 then grouprank.Value = rank else grouprank.Value = "Join U.F.P." end playerStats[player] = leaderstats end) local playerstats = {} game.Players.PlayerAdded:connect (function (player) local leaderstats = Instance.new("Model", player) leaderstats.Name = "Allies" end) --you forgot to close this one local playerstats = {} game.Players.PlayerAdded:connect(function(player) local leaderstats = Instance.new("Model", player) leaderstats.Name = "Enemy" end) -- and also this one