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
 

Car

Previous Thread :: Next Thread 
kingseulgi is not online. kingseulgi
Joined: 14 Jun 2015
Total Posts: 44
02 Mar 2017 06:57 AM
how do i make sotaht cars will make money when droven
Report Abuse
Disillusions is not online. Disillusions
Joined: 10 Jul 2011
Total Posts: 6365
02 Mar 2017 07:08 AM
while wait() do
workspace:ClearAllChildren('Drivers') --to clear the list of drivers and refresh it
if car.IsDriving() then --check if driving
player:AddCash(1000) --add cash
end
end


Report Abuse
Gomlsauresrex is not online. Gomlsauresrex
Joined: 25 Mar 2016
Total Posts: 3588
02 Mar 2017 07:39 AM
local seat = game.Workspace.Car.Seat

function addmoney(user)
user.leaderstats.Money.Value = user.leaderstats.Money.Value + 5
end

sear.Changed:connect(function(property)
if property ~= "Occupant" then return end
local occupant = seat.Occupant
local character = seat.Occupant.Parent
local player = game.Players:GetPlayerFromCharacter(character)
if player then
repeat wait(10) addmoney(player) until not occupant
end
end)
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