Mad_28
|
  |
| Joined: 26 Feb 2016 |
| Total Posts: 527 |
|
|
| 07 Oct 2016 11:47 AM |
i need a script that make it so you dont have to touch the part collector to collect you money and have it autocollect for you, if inerested pm me or contct me on sky @madog8000
|
|
|
| Report Abuse |
|
|
|
| 07 Oct 2016 11:54 AM |
--get the player, CHANGE THIS LINE depending on who is the tycoon owner. local owner = game.Players.TehIcyStar
script.Parent.Touched:connect(function (part)
--part checking if part.Name == "TycoonBrick" then
--award money, or change whatever value in leaderstats. Check the money awarding script --inside of the collection part, and paste it instead of this next line: owner.leaderstats.money = owner.leaderstats.money + 50
--if there are upgrades else if part.Name == "TycoonBrick2" then owner.leaderstats.money = owner.leaderstats.money + 100
--close the if statement end
--close the function end)
finished code:
local owner = game.Players.TehIcyStar
script.Parent.Touched:connect(function (part) if part.Name == "TycoonBrick" then owner.leaderstats.money = owner.leaderstats.money + 50 else if part.Name == "TycoonBrick2" then owner.leaderstats.money = owner.leaderstats.money + 100 end end) |
|
|
| Report Abuse |
|
|
Mad_28
|
  |
| Joined: 26 Feb 2016 |
| Total Posts: 527 |
|
| |
|
|
| 07 Oct 2016 12:02 PM |
| Did you just paste the script without changing it, expecting it to work? You're supposed to change it. |
|
|
| Report Abuse |
|
|