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: Why won't this work?

Previous Thread :: Next Thread 
boxerboycool is not online. boxerboycool
Joined: 04 Mar 2011
Total Posts: 3979
25 Mar 2013 07:57 PM
I'm a noob..


while true do
wait(50)
Script1.Parent.Transparency = 1
Script1.Parent.CanCollide = false
wait(50)
Script1.Parent.Transparency = 0
Script1.Parent.CanCollide = true
end

Report Abuse
Solotaire is not online. Solotaire
Joined: 30 Jul 2009
Total Posts: 30356
25 Mar 2013 08:04 PM
You don't have the path to "Script1"
If "Script1" is the name of this script, simply use:
script.Parent instead of Script1.Parent
If it is not, then you can use any of the following:
game.Workspace.Script1
workspace.Script1
Workspace.Script1
Report Abuse
boxerboycool is not online. boxerboycool
Joined: 04 Mar 2011
Total Posts: 3979
25 Mar 2013 08:12 PM
Still didn't work when I put 'Script.Parent' is it because there is other scripts with the names 'Script'.
Report Abuse
Solotaire is not online. Solotaire
Joined: 30 Jul 2009
Total Posts: 30356
25 Mar 2013 08:15 PM
script.Parent, not Script.Parent
Also, your wait time is set to 50. This value is in seconds. Try making it something such as wait(1) and try testing it.
Report Abuse
boxerboycool is not online. boxerboycool
Joined: 04 Mar 2011
Total Posts: 3979
25 Mar 2013 08:26 PM
Script. with a S, affects it?
Report Abuse
mylifeis2cooldlol is not online. mylifeis2cooldlol
Joined: 08 Mar 2011
Total Posts: 874
25 Mar 2013 08:28 PM
Lua is Case Sensitive so A will be different from a (unless they were set the same)
A could be a brick
a could be a number
Report Abuse
mylifeis2cooldlol is not online. mylifeis2cooldlol
Joined: 08 Mar 2011
Total Posts: 874
25 Mar 2013 08:29 PM
Script could be a variable within the script.
script is the actual script
Report Abuse
boxerboycool is not online. boxerboycool
Joined: 04 Mar 2011
Total Posts: 3979
25 Mar 2013 08:29 PM
Seriously? Fliippingg heck.
Report Abuse
Solotaire is not online. Solotaire
Joined: 30 Jul 2009
Total Posts: 30356
25 Mar 2013 08:32 PM
Yes. If you run it in Studio, you would get the following output:
[Time] - Workspace.BasePlate.Script:3: attempt to index global 'Script' (a nil value)

Here is the working script:
while wait(1) do
script.Parent.Transparency = 1
script.Parent.CanCollide = false
wait(1)
script.Parent.Transparency = 0
script.Parent.CanCollide = true
end

If you want to change it back to 50 inside of the waits, be my guest. The 1 is just for demonstrating purposes, and I assume this is going to be some kind of a door in which a wait of 1 would not be appropriate.
Report Abuse
mylifeis2cooldlol is not online. mylifeis2cooldlol
Joined: 08 Mar 2011
Total Posts: 874
25 Mar 2013 08:32 PM
Yep...learned it many of times when I had the variable Do in the script...I put do and it would break because it was a different thing entirely...
Report Abuse
boxerboycool is not online. boxerboycool
Joined: 04 Mar 2011
Total Posts: 3979
25 Mar 2013 08:36 PM
Dang, you guys are helpful.
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