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
 

In need of a lot of help...

Previous Thread :: Next Thread 
imthepro123456 is not online. imthepro123456
Joined: 08 Jun 2012
Total Posts: 200
15 Feb 2013 11:18 AM
local brick = Workspace.Brick


function OnTouch(part)
brick.Transparency = 1
wait(1)
brick.Transparency = 0



brick.Touched:Connect(OnTouch)
end

When I touch it, it's supposed to change it's Transparency. What have I did wrong?
Report Abuse
1Topcop is not online. 1Topcop
Joined: 09 Jun 2009
Total Posts: 6635
15 Feb 2013 11:20 AM
local brick = Workspace.Brick

function OnTouch(part)
brick.Transparency = 1
wait(1)
brick.Transparency = 0
end -- This end belongs to the function, if the connect it inside the function, the function will never fire the way you intend it too.

brick.Touched:connect(OnTouch) -- Lowercase c
Report Abuse
imthepro123456 is not online. imthepro123456
Joined: 08 Jun 2012
Total Posts: 200
15 Feb 2013 11:23 AM
Thanks!
Report Abuse
1Topcop is not online. 1Topcop
Joined: 09 Jun 2009
Total Posts: 6635
15 Feb 2013 11:26 AM
You're welcome.
Report Abuse
SouthPride is not online. SouthPride
Joined: 13 Feb 2013
Total Posts: 40
15 Feb 2013 11:52 AM
local brick = game.Workspace.Brick

-- Try that.
Report Abuse
SouthPride is not online. SouthPride
Joined: 13 Feb 2013
Total Posts: 40
15 Feb 2013 11:53 AM
Also the end goes before the Connect.

Also what 1topcop pointed out.
Report Abuse
1Topcop is not online. 1Topcop
Joined: 09 Jun 2009
Total Posts: 6635
15 Feb 2013 10:45 PM
@South Workspace is a built-in variable that is equal to game.Workspace
http://wiki.roblox.com/index.php/Workspace
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