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
 

Close script isnt working?

Previous Thread :: Next Thread 
InstanceDotNew is not online. InstanceDotNew
Joined: 15 Jun 2012
Total Posts: 18
16 Jul 2012 04:23 PM
-- Closes, It says somethings wrong with line 14 but I dont know what?
sp = script.Parent
spp = script.Parent.Parent

function onButtonClicked()
spp.MorphOpener.Flasher.Disabled = true
sp.Flasher.Disabled = true
for i=0,1,.1 do
wait(0.1)
if sp.TextTransparency == -1 then
print("Never")
else
sp.TextTransparency = i and sp.BackgroundTransparency = i and spp.MorphOpener.TextTransparency = i and spp.BackgroundTransparency = i
end

script.Parent.MouseButton1Click:connect(onButtonClicked)
Report Abuse
Flash77 is not online. Flash77
Joined: 14 Jun 2008
Total Posts: 550
16 Jul 2012 04:25 PM
dont use ands that way
sp.TextTransparency = i
sp.BackgroundTransparency = i
spp.MorphOpener.TextTransparency = i
spp.BackgroundTransparency = i
Report Abuse
killjoy37 is not online. killjoy37
Joined: 27 Aug 2008
Total Posts: 2821
16 Jul 2012 04:28 PM
You need to add two more end's, one for 'do' and one for 'if'
I can tell you where to put them if you tell me this:
if sp.TextTransparency equals -1 do you want either of these things happening,

sp.TextTransparency = i and sp.BackgroundTransparency = i and spp.MorphOpener.TextTransparency = i and spp.BackgroundTransparency = i

or only if sp.TextTransparency does not equal -1?
Report Abuse
InstanceDotNew is not online. InstanceDotNew
Joined: 15 Jun 2012
Total Posts: 18
16 Jul 2012 04:31 PM
I want it to fade out using a for loop.
Report Abuse
killjoy37 is not online. killjoy37
Joined: 27 Aug 2008
Total Posts: 2821
16 Jul 2012 04:32 PM
Answer my question please
Report Abuse
InstanceDotNew is not online. InstanceDotNew
Joined: 15 Jun 2012
Total Posts: 18
16 Jul 2012 04:49 PM
The first one
Report Abuse
killjoy37 is not online. killjoy37
Joined: 27 Aug 2008
Total Posts: 2821
16 Jul 2012 07:30 PM
Try this:

sp = script.Parent
spp = sp.Parent

function onButtonClicked()
spp.MorphOpener.Flasher.Disabled = true
sp.Flasher.Disabled = true
for i=0,1,.1 do
wait(0.1)
if sp.TextTransparency == -1 then
print("Never")
else
sp.TextTransparency = i
sp.BackgroundTransparency = i
spp.MorphOpener.TextTransparency = i
spp.BackgroundTransparency = i
end
end
end

script.Parent.MouseButton1Click:connect(onButtonClicked)
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