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 » Scripting Helpers
Home Search
 

Re: I need help with a script.

Previous Thread :: Next Thread 
usfirepilot is not online. usfirepilot
Joined: 17 Jan 2013
Total Posts: 684
05 Feb 2014 11:33 PM
print("This is a tycoon kit from legocitymovie...")
I have this tycoon kit and I made this script:
cash = script.Parent.Parent.Cash

function onTouched(hit)
if hit.Name == "Money" then
hit:remove()
cash.Value = cash.Value + 5
elseif hit.Name == "UpgradedTycoonBrick" then
hit:remove()
cash.Value = cash.Value + 50
end
end

script.Parent.Touched:connect(onTouched)



This script doesn't work, so anyone else know how to make a block turn into money?
Report Abuse
Goulstem is not online. Goulstem
Joined: 04 Jul 2012
Total Posts: 7177
05 Feb 2014 11:38 PM
cash = script.Parent.Parent.Cash

script.Parent.Touched:connect(function(hit)
if hit.Parent:FindFirstChild("Money") ~= nil then
hit.Parent:Destroy()
cash.Value = cash.Value + 5
elseif hit.Parent:FindFirstChild("UpgradedTycoonBrick") ~= nil then
hit.Parent:Destroy()
cash.Value = cash.Value + 50
end end end) --this might be 'end end)', try that if it doesn't work the first time
Report Abuse
usfirepilot is not online. usfirepilot
Joined: 17 Jan 2013
Total Posts: 684
05 Feb 2014 11:51 PM
That doesn't delete the block
Report Abuse
usfirepilot is not online. usfirepilot
Joined: 17 Jan 2013
Total Posts: 684
05 Feb 2014 11:54 PM
I really need this script into my tycoon! Please help me!
Report Abuse
usfirepilot is not online. usfirepilot
Joined: 17 Jan 2013
Total Posts: 684
06 Feb 2014 07:41 AM
Bump. I really need help! PPPPPPPLLLLLLEEEEEAAAAASSSSEEEE?
Report Abuse
usfirepilot is not online. usfirepilot
Joined: 17 Jan 2013
Total Posts: 684
06 Feb 2014 07:43 AM
Thread Closed
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