generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

No output - test dropper not working?

Previous Thread :: Next Thread 
RobuxLife is not online. 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 is not online. RobuxLife
Joined: 19 Sep 2012
Total Posts: 13336
17 Jul 2016 08:39 PM
Bump


Report Abuse
RobuxLife is not online. RobuxLife
Joined: 19 Sep 2012
Total Posts: 13336
17 Jul 2016 09:00 PM
xvcxvcxx


Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image