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

Increase money when part gets Destroyed?

How can I make a script that if a part is destroyed that I then get Money? Please Help me because I'm not very good in Scripting :)

1 answer

✓ Accepted answer

first, make a numbervalue in workspace. name it money, and if you want it to reset it when the player joins the game, put a script inside it and write:

script.Parent.Value = 0

then, to make it give you money when destroyed, put a script in workspace and in it write:

workspace.thebricktobedestroyed.DescendantRemoving:connect(function()
workspace.money.Value = workspace.money.Value + 100
end)

there! hope this works!

3 comments

0

why did mine get downvoted..?

0

Because it's not a good answer. You're actually spoonfeeding code.

0

Uuuuuuuhhhh, i have no idea what you mean, man

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