У меня есть таблица лидеров в одном сценарии. Это мой код:
print("Cash Leaderboard Loaded")
function onPlayerEntered(newPlayer)
local stats = Instance.new("IntValue")
stats.Name = "leaderstats"
local cash = Instance.new("IntValue")
cash.Name = "Money" --name of currency (e.g. cash, money, resources, bucks, etc.)
cash.Value = 50 --starting money.
cash.Parent = stats
stats.Parent = newPlayer
end
game.Players.ChildAdded:connect(onPlayerEntered)
Я пытаюсь сделать так, чтобы, когда вы нажимаете на блок, это дает вам больше денег.
Код в другом скрипте.
Кто-нибудь знает, как заставить это работать?