of     1   

lnplodedalt
#139133534Thursday, July 03, 2014 7:54 PM GMT

Hierarchy: Part >SurfaceGUI >>Frame >>>TextLabel >>>>Script >SurfaceGUI named click >>TextButton I want this script to run when the textbutton is clicked, then fade the text out, change it, then fade the new text in. sp = script.Parent db = false function onClick() if not db then db = true wait(0.1) for i = 0.1, 1, 0.01 do sp.TextTransparency = i wait() end sp.TextYAlignment = "Top" sp.Text = ([[exampleheader exampletext]]) wait(0.5) for i = 1, 0.1, -0.01 do sp.TextTransparency = i wait() end wait(3) db = false end script.Parent.Parent.Parent.Parent.click.TextButton.MouseButton1Click:connect(onClick) end
lnplodedalt
#139133644Thursday, July 03, 2014 7:55 PM GMT

Forgot to say that my problem is that no part is running after being clicked.
lnplodedalt
#139144332Thursday, July 03, 2014 9:29 PM GMT

bumpOZmnx
Quasiduck
#139144908Thursday, July 03, 2014 9:33 PM GMT

script.Parent.Parent.Parent.Parent.click.TextButton.MouseButton1Click:connect(onClick) Make this to come AFTER the function ends. (Basically put it on the last line of the script)
lnplodedalt
#139146047Thursday, July 03, 2014 9:44 PM GMT

@samy did it, still not working at all i added prints to see if the function was even starting sp = script.Parent db = false print("1") function onClick() if not db then db = true wait(0.1) print("2") for i = 0.1, 1, 0.01 do sp.TextTransparency = i wait() end print ("3") sp.TextYAlignment = "Top" sp.Text = ([[1. Right of Safety All citizens have the right to beat Maniakov extremists, that are participating in an illegal or suspicous activity, without questioning. The force is limited to your hands, and must stop after the extremist is subdued.]]) wait(0.5) for i = 1, 0.1, -0.01 do sp.TextTransparency = i wait() end wait(3) db = false end end script.Parent.Parent.Parent.Parent.click.TextButton.MouseButton1Click:connect(onClick) output: 1 meaning the function isnt being called correctly what could be the problem?
lnplodedalt
#139175592Friday, July 04, 2014 3:01 AM GMT

bumpl18iO

    of     1