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
 

Re: I Need a script for a tycoon (pay)

Previous Thread :: Next Thread 
Mad_28 is not online. 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
TehIcyStar is not online. TehIcyStar
Joined: 07 Mar 2010
Total Posts: 1649
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 is not online. Mad_28
Joined: 26 Feb 2016
Total Posts: 527
07 Oct 2016 12:01 PM
dosen't work


Report Abuse
TehIcyStar is not online. TehIcyStar
Joined: 07 Mar 2010
Total Posts: 1649
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
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