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
We use cookies to offer you a better experience. By using Roblox.com, you are agreeing to our Privacy and Cookie Policy.
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Tycoon Colect Cash.

Previous Thread :: Next Thread 
McMrChip is not online. McMrChip
Joined: 07 Jan 2010
Total Posts: 340
06 Sep 2011 01:47 PM
local owner = script.Parent.Parent.Parent.Owner
function onHit(hit)
if check ~= nil then
print("A Human Has hit,FoundHumoind")
local user = game.Players:GetPlayerFromCharacter(hit.Parent)
if user.Name == owner.Value then
local cash = user:findFirstChild("Money")
cash.Value = cash.Value + script.Parent.Parent.Money.Value
script.Parent.Parent.Money.Value = 0
end
end
end
script.Parent.Touched:connect(onHit)

Im very sure that it is the function(onHit),because it does not print:A Human Has hit,FoundHumoind And the output says the script is running.
Report Abuse
MrgamesNwatch is not online. MrgamesNwatch
Joined: 02 Feb 2009
Total Posts: 7729
06 Sep 2011 01:49 PM
whats "check"? i don't see it defined anywhere.
Report Abuse
McMrChip is not online. McMrChip
Joined: 07 Jan 2010
Total Posts: 340
06 Sep 2011 02:10 PM
Thanks!I copped parts like that out of a Tycoon button I made It works now,thank you for spotting and helping me. :D
Report Abuse
Miro034 is not online. Miro034
Joined: 07 Oct 2009
Total Posts: 6568
06 Sep 2011 02:17 PM
Is this free model? (Just asking)
Report Abuse
lukasbreki is not online. lukasbreki
Joined: 08 Mar 2010
Total Posts: 13560
06 Sep 2011 02:22 PM
Just needed to define check. :Þ
Report Abuse
McMrChip is not online. McMrChip
Joined: 07 Jan 2010
Total Posts: 340
11 Sep 2011 03:33 PM
@Miro034 Nope,im just learning how tycoons work as I allready owned a tycoon (which was a free model tycoon kit)I felt abit cheep and lazy,so...I started to make my own!
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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