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: Gui Function

Previous Thread :: Next Thread 
StrawberryEwok is not online. StrawberryEwok
Joined: 05 Dec 2009
Total Posts: 180
17 May 2014 10:10 AM
-- It disconnects due to exception here... What's wrong?
if script.Parent.Visible == true then
Report Abuse
Trioxide is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
17 May 2014 10:11 AM
I doubt it is because of that.

Post the lines around that line.
Report Abuse
StrawberryEwok is not online. StrawberryEwok
Joined: 05 Dec 2009
Total Posts: 180
17 May 2014 10:12 AM
--Well, it worked before I added this line, and the extra end.

local dialog = script.Parent.Parent:FindFirstChild("Dialog")
local one = script.Parent.Parent:FindFirstChild("Choice1")
local two = script.Parent.Parent:FindFirstChild("Choice2")

function onClick(click)
if script.Parent.Visible == true then
one.TextColor3 = one.TextStrokeColor3
one.TextStrokeTransparency = 0.9
wait(0.5)
one.TextColor3 = Color3.new(0, 0, 0)
one.TextStrokeTransparency = 0.75
dialog.Text = ("Hello!")
one.Text = ("Hello!")
two.Text = ("Goodbye!")
end
end

script.Parent.MouseButton1Down:connect(onClick)
Report Abuse
Trioxide is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
17 May 2014 10:15 AM
dialog, one, two are TextLabels and script.Parent is a TextButton? eh
Report Abuse
StrawberryEwok is not online. StrawberryEwok
Joined: 05 Dec 2009
Total Posts: 180
17 May 2014 10:17 AM
1 and 2 are text buttons. There's a script like this in each. Dialog is text label. ._.
Report Abuse
Trioxide is not online. Trioxide
Joined: 29 Mar 2011
Total Posts: 32902
17 May 2014 10:19 AM
Sorry, but I'm not sure what causes this.
Report Abuse
Megadragon2469 is not online. Megadragon2469
Joined: 23 May 2009
Total Posts: 14655
17 May 2014 10:27 AM
sometimes when I add an if and it doesn't work

I put an else at the back of the script so that it won't break
Report Abuse
StrawberryEwok is not online. StrawberryEwok
Joined: 05 Dec 2009
Total Posts: 180
17 May 2014 10:36 AM
That could work. It might be that there's an if in the middle of a function.
Report Abuse
StrawberryEwok is not online. StrawberryEwok
Joined: 05 Dec 2009
Total Posts: 180
17 May 2014 10:38 AM
It's cool, I figured it out. :)
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