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: How Can I Count How Many Studs I Was Driving With Car?

Previous Thread :: Next Thread 
vincius0000 is not online. vincius0000
Joined: 12 Aug 2011
Total Posts: 627
04 May 2015 08:51 AM
Is there a way how to make script count how many studs you drove.
Oh and this is for taxi. I am building role play game.

*There is diff speed so you wont make script to add 1 stud every sec...
Report Abuse
ganger800 is not online. ganger800
Joined: 06 Dec 2012
Total Posts: 427
04 May 2015 08:54 AM
calculate the average speed after some time and then times the time :)
you could do this with storing the speed every 0.25 seconds or something (this shouldn't lag too bad in small games)
Report Abuse
TheNewChicken is not online. TheNewChicken
Joined: 18 Mar 2015
Total Posts: 1997
04 May 2015 08:57 AM
First, make a formula for the speed and then do


while wait(FORMULA) do
--Add studs
end
Report Abuse
vincius0000 is not online. vincius0000
Joined: 12 Aug 2011
Total Posts: 627
04 May 2015 09:00 AM
You mean formula: speed * time?
Report Abuse
ganger800 is not online. ganger800
Joined: 06 Dec 2012
Total Posts: 427
04 May 2015 09:04 AM
chickens idea is more efficient :)

how much speed equals 1 stud? thats why you need a formula
Report Abuse
vincius0000 is not online. vincius0000
Joined: 12 Aug 2011
Total Posts: 627
04 May 2015 09:07 AM
Can you tell me formula please?
Report Abuse
vincius0000 is not online. vincius0000
Joined: 12 Aug 2011
Total Posts: 627
04 May 2015 09:28 AM
Look this is what I will use now:

local drivenstuds = 0

while wait(0.5) do
drivenstuds = drivenstuds + ((script.Parent.Velocity.magnitude * 0.5) / 1000)
wait()
game.Workspace.Message.Text = drivenstuds
end
Report Abuse
vincius0000 is not online. vincius0000
Joined: 12 Aug 2011
Total Posts: 627
04 May 2015 09:29 AM
Oh Its km not studs /\
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