|
| 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
|
  |
| 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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 03 Feb 2012 11:10 PM |
| Just put together some Touched events and for loops and it'll work. |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2012 11:13 PM |
| Ok I will try to make that into a count up script. |
|
|
| Report Abuse |
|
|
|
| 03 Feb 2012 11:23 PM |
| Ya I am not good at loops at all I need more help |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|