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

How do I create a button to give cash?

i did the script but wont work ingame just in studio

Button = script.Parent.TextButton
Player = game.Players.LocalPlayer
Button.MouseButton1Down:connect(function()
	Player.leaderstats.Money.Value = Player.leaderstats.Money.Value + 10
end)

1 answer

local Button = script.Parent:WaitForChild('TextButton')
local Player = game.Players.LocalPlayer
local leader = Player:WaitForChild('leaderstats')
local Money = leader:WaitForChild('Money')

Button.MouseButton1Down:connect(function()
    Money.Value = Money.Value + 10
end)

2 comments

0

thx so much :)

0

Edited for code block. Please provide explanation with your answers.

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