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: Noob scripter, cant tell whats wrong with this.

Previous Thread :: Next Thread 
cheetosrevenge is not online. cheetosrevenge
Joined: 15 Apr 2011
Total Posts: 12565
06 Jul 2014 11:00 AM
local brick = Workspace.P1



function ontouch(part)
brick.Transparency = 0
wait(0.5)
brick.Transparency = 0.3
wait(0.5)
brick.Transparency = 0.5
wait(0.5)
brick.Transparency = 0.7
wait(0.5)
brick.Transparency = 0.9

end
brick.Touched:connect(onTouch)


Output says it tryed to call a nil value, unless i misunderstood the word nil, i dont see any nil values

chk chk boom
Report Abuse
Justin50003 is not online. Justin50003
Joined: 04 Jul 2010
Total Posts: 27043
06 Jul 2014 11:10 AM
nil means none or zero
Report Abuse
jode6543 is not online. jode6543
Joined: 16 Jun 2009
Total Posts: 5363
06 Jul 2014 11:12 AM
You connected to the function onTouch, but your function is named ontouch; Lua is case sensitive.

~Jode
Report Abuse
cheetosrevenge is not online. cheetosrevenge
Joined: 15 Apr 2011
Total Posts: 12565
06 Jul 2014 11:15 AM
Thanks jode!

chk chk boom
Report Abuse
AZant2 is not online. AZant2
Joined: 04 Jul 2010
Total Posts: 878
06 Jul 2014 11:25 AM
You can make this simplier by doing a loop.
local brick = Workspace.P1



function onTouch()
x = 0

repeat
brick.Transparency = x
wait(0.5)
x = x + 0.3
until x == 0.9
end

brick.Touched:connect(onTouch)

But the problem was the case thing.
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