I am new to i, v loops and am not sure how I would match up a string (a) to a players name?
game.ReplicatedStorage.Common.OnServerEvent:Connect(function(player, a)
if player.leaderstats.Credits.Value >= 100 then
player.leadersats.Credits.Value = player.leaderstats.Credits.Value - 100
local plrs = game.Players:GetChildren()
for i, v in pairs(plrs) do
if a == plrs.Name then
local a = -- That player
end
end
end
end)

2 comments
What's the a variable supposed to be?
You don't really need a for loop. You can just do, if game.Players:FindFirstChild(a) then local newPlayer = a end