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