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: Can you help me out with this transparency script?

Previous Thread :: Next Thread 
zorgan9220 is not online. zorgan9220
Joined: 25 Sep 2011
Total Posts: 2115
15 May 2012 05:51 AM
local brick = Workspace.brick
function onTouch(brick)

game.Workspace.brick.transparency = 0.5
wait(20)
game.Workspace.brick.transparency = 0.0
end


brick.Touched:Connect(onTouch)

It says Connect and Touched isn't a valid member.
Report Abuse
Rowpunk is not online. Rowpunk
Joined: 20 Nov 2009
Total Posts: 7387
15 May 2012 06:30 AM
Connect is lowercase. I guess it would also be more efficient to write it like

local brick = Workspace.brick
brick.Touched:connect(function()

Workspace.brick.transparency = 0.5
wait(20)
Workspace.brick.transparency = 0
end)

But I dunno.
Report Abuse
WhoBloxedWho is online. WhoBloxedWho
Joined: 25 Mar 2009
Total Posts: 4611
15 May 2012 07:04 AM


local brick = Workspace.brick

function onTouch(object)
object.transparency = 0.5
wait(20)
object.transparency = 0
end

brick.Touched:connect(onTouch)
Report Abuse
Trioxide is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
15 May 2012 07:46 AM
[ Content Deleted ]
Report Abuse
burton31 is not online. burton31
Joined: 05 Oct 2009
Total Posts: 89
15 May 2012 08:02 AM
local brick = Workspace.brick
brick.Touched:connect(function()

Workspace.brick.transparency = 0.5
wait(20)
Workspace.brick.transparency = 0
end)
Report Abuse
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
15 May 2012 09:31 AM
Transparency is capitalized.

~thedestroyer115, the most helpful builder!~
Report Abuse
TINISH0TZ is not online. TINISH0TZ
Joined: 20 Nov 2009
Total Posts: 2549
15 May 2012 10:20 AM
You have already stated where the Brick is.

Which means "game.Workspace.brick.transparency = 0.5" is useless.

Change it to "brick.transparency = 0.5"

Also, you wouldn't need the 'local' as it was not written as part of the function.

Change it simply to: brick = Game.Workspace.Brick
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
15 May 2012 10:23 AM
What's wrong with you guys??

You're not fixing the other error at all
..

>Also, you wouldn't need the 'local' as it was not written as part of the function.

You can access local variables faster than global..

brick.Transparency = .5
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