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: Timer script

Previous Thread :: Next Thread 
unknown1616 is not online. unknown1616
Joined: 04 Nov 2009
Total Posts: 1025
03 Feb 2012 11:01 PM
I am trying to make a script for my game. Its a race game and that is why I need a timer. I need a script that when you touch a sertin brick a timer will start counting up untill you hit another brick. its for a drag raceing game. Can some one please help me out here. I am not good at scripting. I am still trying to learn thank you.

Unknown1616
Report Abuse
dirk29 is not online. dirk29
Joined: 26 May 2010
Total Posts: 1142
03 Feb 2012 11:02 PM
try to script it and post the script and we will try to de-bug it. Please don't request.
Report Abuse
unknown1616 is not online. unknown1616
Joined: 04 Nov 2009
Total Posts: 1025
03 Feb 2012 11:04 PM
Im not asking for some one to make it. I want to do it my self. I just want help to get it started.
Report Abuse
dirk29 is not online. dirk29
Joined: 26 May 2010
Total Posts: 1142
03 Feb 2012 11:09 PM
Well a easy way to do a countdown is

for i = 30,0,-1 do
WHATEVER = "Racing : "..i
wait(1)
end
Report Abuse
epicfail22 is not online. epicfail22
Joined: 25 Sep 2009
Total Posts: 3739
03 Feb 2012 11:10 PM
Just put together some Touched events and for loops and it'll work.
Report Abuse
unknown1616 is not online. unknown1616
Joined: 04 Nov 2009
Total Posts: 1025
03 Feb 2012 11:13 PM
Ok I will try to make that into a count up script.
Report Abuse
unknown1616 is not online. unknown1616
Joined: 04 Nov 2009
Total Posts: 1025
03 Feb 2012 11:23 PM
Ya I am not good at loops at all I need more help
Report Abuse
LuisPambid is not online. LuisPambid
Joined: 31 Mar 2011
Total Posts: 532
03 Feb 2012 11:24 PM
for i=0,3,1 do
M=Instance.new("Message")
M.Parent=Workspace
M.Text=i
end

you can do

for i=1,3 do
M=Instance.new("Message")
M.Parent=Workspace
M.Text=i
end
Report Abuse
unknown1616 is not online. unknown1616
Joined: 04 Nov 2009
Total Posts: 1025
03 Feb 2012 11:28 PM
No I am trying to do something that here is what I am talking about.

I am raceing I touch a start brick the time on the screen counts up.

Then I hit a stop timmer brick and that number on the screen is my time of the drag race. See what makes it so hard is that I am not good at loops and I am a new scripter in general. I dont even know how to work screen guis that good. I can, but not that good.
Report Abuse
epicfail22 is not online. epicfail22
Joined: 25 Sep 2009
Total Posts: 3739
03 Feb 2012 11:49 PM
You can use a hint. This won't work, but it's something to start with.

carName = "Car"
Start = game.Workspace["StartBrickName"]
End = game.Workspace["EndBrickName"]

Start.Touched:connect(function(part)
if part and part.Parent and part.Parent.Name:match(carName) then
car = part.Parent
driver = car:findFirstChild("VehicleSeat"):findFirstChild("SeatWeld").Value.Parent
display = Instance.new("Hint",game.Players:GetPlayerFromCharacter(driver).PlayerGui)
char.Torso.Touched:connect(function(part)
if part and part == End then
--idk how to break the for loop from here...
display.Text = "You have finished the drag race in "..(secondsVariablePath).." seconds."
end
end)
for i=0, math.huge do
display.Text = "Elapsed Time: "..i
wait(1)
end
end
end)
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