Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

My script doesn't work on money editor?

 local RetName = script.Parent.Parent.TextBox1.Text
local accountingSystem = game:GetService("DataStoreService"):GetDataStore("bankMoney")
local player = script.Parent.Parent.Parent.Parent
local amount = script.Parent.Parent.TextBox.Text

local button, state = script.Parent, false

button.MouseButton1Down:connect(function()
local pocash=player.playerstats.pocketMoney.Value
local bacash=player.playerstats.bankMoney.Value
amount=math.floor(amount)
player.playerstats.bankMoney.Value=bacash+amount
end)

I am trying to make something that allows me to edit a players money via gui. Not stored on leaderboard

1 answer

local RetName = script.Parent.Parent.TextBox1.Text
local accountingSystem = game:GetService("DataStoreService"):GetDataStore("bankMoney")
local player = script.Parent.Parent.Parent.Parent
local amount = script.Parent.Parent.TextBox.Text

local button, state = script.Parent, false

button.MouseButton1Down:connect(function()

	local pocash=player.playerstats.pocketMoney.Value
	local bacash=player.playerstats.bankMoney.Value

	amount=math.floor(amount)

	player.playerstats.bankMoney.Value=bacash+amount

end)

Simplified for if anyone needs to copy

This discussion is preserved as it was. New answers, comments, and votes are closed.