CarlosMX
|
  |
| Joined: 30 Apr 2011 |
| Total Posts: 791 |
|
|
| 18 Dec 2012 06:08 PM |
This isnt working.. Can anyone help me?
local Petrov = game.Workspace.Startinggrid.Cars.Petrov
function onClick() Petrov.Torso.Friction = 2 script.Parent.Parent.Name = KERS Activated wait(2) script.Parent.Parent.Name = KERS Left: 6 wait(3) script.Parent.Parent.Name = KERS Left: 3 wait(3) Petrov.Torso.Friction = 1.5 script.Parent.Parent.Name = KERS Deactivated for 20 seconds wait(20) script.Parent.Parent.Name = KERS Availible
end script.Parent.ClickDetector.MouseClick:connect(onClick) |
|
|
| Report Abuse |
|
|
|
| 18 Dec 2012 06:11 PM |
When defining a string use ""'s, what i mean is when you manipulate a name, put "'s around it like this
pie.Name = "PIE DEMON" |
|
|
| Report Abuse |
|
|
|
| 18 Dec 2012 06:11 PM |
The name should be in strings.
ex:
script.Parent.Parent.Name = "KERS Activated"
¤ † KMXD† ¤ |
|
|
| Report Abuse |
|
|
|
| 18 Dec 2012 06:12 PM |
@vampire
It doesn't have to be single quotations.
¤ † KMXD† ¤ |
|
|
| Report Abuse |
|
|
|
| 18 Dec 2012 06:12 PM |
double quotations*
¤ † KMXD† ¤ |
|
|
| Report Abuse |
|
|
CarlosMX
|
  |
| Joined: 30 Apr 2011 |
| Total Posts: 791 |
|
| |
|
CarlosMX
|
  |
| Joined: 30 Apr 2011 |
| Total Posts: 791 |
|
|
| 18 Dec 2012 06:50 PM |
I've added a bit to the script, and now it won't work again...
local Petrov = game.Workspace.Startinggrid.Cars.Petrov local Clicker = script.Parent.ClickDetector local Clicker1 = game.Lighting.ClickDetector
function onClick() Petrov.Torso.Friction = 2 Clicker:remove() script.Parent.Parent.Name = "KERS Activated" wait(2) script.Parent.Parent.Name = "KERS Left: 6" wait(3) script.Parent.Parent.Name = "KERS Left: 3" wait(3) Petrov.Torso.Friction = 1.5 script.Parent.Parent.Name = "KERS Deactivated for 20 seconds" wait(20) script.Parent.Parent.Name = "KERS Availible" Clicker1:clone() = script.Parent
end script.Parent.ClickDetector.MouseClick:connect(onClick) |
|
|
| Report Abuse |
|
|
|
| 18 Dec 2012 06:52 PM |
When cloning, you need to parent the clone.
Clicker1:Clone().Parent = script.Parent
btw, it's "Available".
¤ † KMXD† ¤
|
|
|
| Report Abuse |
|
|
CarlosMX
|
  |
| Joined: 30 Apr 2011 |
| Total Posts: 791 |
|
|
| 18 Dec 2012 07:00 PM |
| Brilliant, thank you so much for your help :) |
|
|
| Report Abuse |
|
|
CarlosMX
|
  |
| Joined: 30 Apr 2011 |
| Total Posts: 791 |
|
|
| 18 Dec 2012 07:20 PM |
Sorry to bother you AGAIN, its just that another script has failed me :/
local Petrov = game.Workspace.Startinggrid.Cars.Petrov local Refuel = game.Lighting.Refuel1
while true do wait(20) script.Parent.Parent.Name = "Fuel: 75%" wait(20) script.Parent.Parent.Name = "Fuel: 50%" wait(20) script.Parent.Parent.Name = "Fuel: 25%" wait(20) script.Parent.Parent.Name = "Your car is out of fuel!" wait(2) Petrov.Torso.Anchored = true script.Parent.Parent.Name = "Refueling....." wait(5) Petrov.Torso.Anchored = false script.Parent.Parent.Name = "Fuel: 100%"
end
|
|
|
| Report Abuse |
|
|
CarlosMX
|
  |
| Joined: 30 Apr 2011 |
| Total Posts: 791 |
|
|
| 18 Dec 2012 07:23 PM |
Sorry, Nevermind, I forgot to remove the line: local Refuel = game.Lighting.Refuel1
|
|
|
| Report Abuse |
|
|