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: Script not working

Previous Thread :: Next Thread 
CarlosMX is not online. 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
vampirexevipex is not online. vampirexevipex
Joined: 11 Apr 2009
Total Posts: 1598
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
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
18 Dec 2012 06:11 PM
The name should be in strings.

ex:

script.Parent.Parent.Name = "KERS Activated"

¤ † KMXD† ¤
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
18 Dec 2012 06:12 PM
@vampire

It doesn't have to be single quotations.

¤ † KMXD† ¤
Report Abuse
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
18 Dec 2012 06:12 PM
double quotations*

¤ † KMXD† ¤
Report Abuse
CarlosMX is not online. CarlosMX
Joined: 30 Apr 2011
Total Posts: 791
18 Dec 2012 06:38 PM
Thanks
Report Abuse
CarlosMX is not online. 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
KnightmareXD is not online. KnightmareXD
Joined: 14 Jul 2009
Total Posts: 11189
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 is not online. 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 is not online. 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 is not online. 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
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