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: Is this right?

Previous Thread :: Next Thread 
SapphireWarrior1 is not online. SapphireWarrior1
Joined: 17 Aug 2012
Total Posts: 31
18 Aug 2012 01:16 PM
Makes it invisible ontouch then changes back to normal.



local brock = workspace.brick

function onTouch (part)
brick.Transparency = 1
wait(3)
brick.Transparency = 0
end


Brick.Touched:connect (onTouch)



Is this right? Im a bigginer
Report Abuse
ArceusInator is not online. ArceusInator
Joined: 10 Oct 2009
Total Posts: 30553
18 Aug 2012 01:19 PM
You have to, have to, HAAAAAVE TOOOOO, make sure that all you variables are the correct capitalization and spelling. For example:

this = 1

print(This) -- will print 'nil' because "this" and "This" aren't the same thing.
Report Abuse
miz656 is not online. miz656
Joined: 19 Jul 2010
Total Posts: 15336
18 Aug 2012 01:20 PM
^

this = 1
This = this
print(This)

:3

But yeah, arceus is right.
Report Abuse
SapphireWarrior1 is not online. SapphireWarrior1
Joined: 17 Aug 2012
Total Posts: 31
18 Aug 2012 01:22 PM
what would i capitalize
Report Abuse
SapphireWarrior1 is not online. SapphireWarrior1
Joined: 17 Aug 2012
Total Posts: 31
18 Aug 2012 01:25 PM
And thats for the help
Report Abuse
ArceusInator is not online. ArceusInator
Joined: 10 Oct 2009
Total Posts: 30553
18 Aug 2012 01:25 PM
"local brock = workspace.brick"

Here you defined "brock". If you want to reference the brick, you will need to use "brock" unless you assign a new variable to the brick.


"Brick.Touched:connect (onTouch)"

Here you use "Brick" instead of "brock". That won't work because, to Lua, they're completely different words that mean completely different things. You need to change "Brick" to "brock" to connect the event.


"brick.Transparency"

Here you used another word with a completely different meaning. You need to replace "brick" with "brock". One little letter can and will completely ruin your script.
Report Abuse
SapphireWarrior1 is not online. SapphireWarrior1
Joined: 17 Aug 2012
Total Posts: 31
18 Aug 2012 01:28 PM
sorr that was a spelling mistake =)
Report Abuse
SapphireWarrior1 is not online. SapphireWarrior1
Joined: 17 Aug 2012
Total Posts: 31
18 Aug 2012 01:28 PM
*sorry*
Report Abuse
SapphireWarrior1 is not online. SapphireWarrior1
Joined: 17 Aug 2012
Total Posts: 31
18 Aug 2012 01:33 PM
so if i had no spelling mstakes it would be right
Report Abuse
ArceusInator is not online. ArceusInator
Joined: 10 Oct 2009
Total Posts: 30553
18 Aug 2012 01:36 PM
That's correct.
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