RobuxLife
|
  |
| Joined: 19 Sep 2012 |
| Total Posts: 13336 |
|
|
| 17 Jul 2016 08:35 PM |
Hi guys!
I was bored so I decided to make a tycoon dropper thing, that even allows you to collect money.
I have this local script in the model:
local catcher = script.Parent:WaitForChild("Catcher") local builtupcash = script.Parent:WaitForChild("BuiltUpCash")
function addCash(part) local cashtoadd = part:WaitForChild("ACash") part:Destroy() builtupcash.Value = builtupcash.Value + cashtoadd if not cashtoadd then print("It's a player!") local a = part:GetPlayerFromCharacter() a.leaderstats.Cash.Value = a.leaderstats.Cash.Value + cashtoadd end end catcher.Touched:connect(addCash) I tried a serverscript, but I just get errors. Nothing happens on the localscript, no errors either. What I'm trying to do:
if the cashtoadd is touched by a part, get the ACash value from the part and add it on to the builtupcash. Then, the part is destroyed. If the player touches the part, the player gets all the money from builtupcash.
|
|
|
| Report Abuse |
|
RobuxLife
|
  |
| Joined: 19 Sep 2012 |
| Total Posts: 13336 |
|
| |
RobuxLife
|
  |
| Joined: 19 Sep 2012 |
| Total Posts: 13336 |
|
| |