I'm currently trying to make a game that when you click a GUI button it fires the server to add $5 to the player's money count (I know I should make a leaderstats for the money but I just put it in the Gui so it's easier to reach)
game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(player)
local name = player
local valuee = game.Players.Name.PlayerGui.money
print(name)
valuee.value = valuee.value + 5
end)
it comes up with the error: ServerScriptService.Script:3: attempt to index nil with 'money'
