I am quite new to Roblox coding, I understand the fundamentals but I am confused on this. I followed a small YouTube tutorial on making a currency system and I wanted to know the value of "player" or what it means. Here is the current script.
game.Players.PlayerAdded:Connect(function(player) local value = Instance.new("NumberValue", player) value.Name = "Currency" end)
workspace.Baseplate:WaitForChild("Humanoid").ClickDetector.MouseClick:Connect(function(player) player.Currency.Value = player.Currency.Value + 10 if (player.Currency.Value + 10) >= 220 then player.Currency.Value = player.Currency.Value - 10 end
end)
workspace.Baseplate:WaitForChild("Buyitem").ClickDetector.MouseClick:Connect(function(player) if (player.Currency.Value - 50) >= 0 then player.Currency.Value = player.Currency.Value - 50 end end)

1 comment
So that code that you commented pretty much means function(player) ?