Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

how can i give people money by a money collector and giver? [closed]

Asked by 7 years ago

How can i make that when a part touches another part that the part that touches it disapear and then add money to the money collector and where should i putt the script(if it is a script).

0
What do you mean "Add money"? 65225 80 — 7y
0
I think he means a leader board value? I'm not exactly sure.. T0XN 276 — 7y
0
You know the thing where they stand up when the wanted to claim theire money that's what i wanna know and then when they claimed it how to set it up in the leaferboard bramieboy241 -19 — 7y

Closed as Not Constructive by PyccknnXakep, Thetacah, Void_Frost, hiimgoodpack, and BlackOrange3343

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?

1 answer

Log in to vote
0
Answered by
deris88 146
7 years ago
Edited 7 years ago

Hi.

That's a simple question This is a server script inside of the Collector.

local Bank = script.Parent --The part that will be touched and will remove the part that touched it.
local PartName = "Money" --How should a part, that will be removed, named
local Collector = game.Workspace.Collector --Where the collector is located (you can edit this)
local MoneyAmount = 5 --how much money will a Part give

Bank.Touched:connect(function(hit)
    if hit.ClassName == "Part" and hit.Name == PartName then
        hit:Destroy()
        Collector.Money.Value = Collector.Money.Value + MoneyAmount
    end
end)
--------------------------------------------
--------------------------------------------
--You will have to add an IntValue to the Collector. 

--if you don't know how, use this:
local IntVal = Instance.new("IntValue")
IntVal.Name = "Money"
IntVal.Parent = Collector
IntVal.Value = 0 --Change to starting Money amount

Here you go. This will help you at the beginning ;)

0
And maybe a stupid question but where do i put the script at the dropper or at collector? bramieboy241 -19 — 7y
Ad