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: Script error which doesn't seem to exist?

Previous Thread :: Next Thread 
Jakeup10 is not online. Jakeup10
Joined: 29 Nov 2008
Total Posts: 6782
01 May 2013 11:33 AM
script.Parent.ClickDetector.MouseClick:connect(onClicked)

function onClicked()
script.Parent.Transparency = 0
script.Parent.CanCollide = true
script.Parent.02.Script.Disabled = false
script.Parent.02.Transparency = 0.5
script.Disabled = true
end


The script doesn't seem to work, but it says the problem is with the line to turn cancollide true...I don't see any problems? So whats wrong with it?
Report Abuse
hardhatworker is not online. hardhatworker
Joined: 29 Jan 2009
Total Posts: 8518
01 May 2013 11:40 AM
function onClicked(c)
script.Parent.Transparency = 0
script.Parent.CanCollide = true
script.Parent.02.Script.Disabled = true
script.Parent.02.Transparency = 0.5
script.Disabled = false
end

Try that
Report Abuse
iGap is not online. iGap
Joined: 17 Mar 2013
Total Posts: 1087
01 May 2013 11:42 AM
script.Parent.ClickDetector.MouseClick:connect(function()
script.Parent.Transparency = 0
script.Parent.CanCollide = true
script.Parent.02.Script.Disabled = false
script.Parent.02.Transparency = 0.5
script.Disabled = true
end)
Report Abuse
Jakeup10 is not online. Jakeup10
Joined: 29 Nov 2008
Total Posts: 6782
01 May 2013 03:58 PM
@Hard,
Nothing happened

@iGap
Just made "script.Parent.02.Script.Disabled = false" the error...

Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
01 May 2013 04:38 PM
The connection line must always go after the function, unless it's an anonymous function (like IGaps)
Report Abuse
velibor is not online. velibor
Joined: 24 Nov 2009
Total Posts: 1003
01 May 2013 04:43 PM
script.Parent["02"].Disabled = false

02 is something that you need to put between []
Report Abuse
Jakeup10 is not online. Jakeup10
Joined: 29 Nov 2008
Total Posts: 6782
01 May 2013 08:25 PM
@Veli,
That helped, but now I get...

"Attempt to call a nil value"
"disconnected event because of exception"
Report Abuse
smiley599 is not online. smiley599
Joined: 23 Jan 2010
Total Posts: 21869
02 May 2013 01:18 AM
Is 02 grouped with the script; it should be.
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