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

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

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).

3 comments

0

What do you mean "Add money"?

0

I think he means a leader board value? I'm not exactly sure..

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

1 answer

✓ Accepted answer

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 ;)

1 comment

0

And maybe a stupid question but where do i put the script at the dropper or at collector?

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