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: What's wrong with this?

Previous Thread :: Next Thread 
epicpatrick123 is not online. epicpatrick123
Joined: 08 Sep 2010
Total Posts: 15039
10 Jun 2012 09:38 AM
function player()
wait(1)
script.Parent.Parent.Output.Line1.Text = "Test1"
wait(1)
script.Parent.Parent.Output.Line2.Text = "Test2"
wait(1)

script.Parent.MouseEnter:connect(player)


The way it is accessed is correct, but i don't know what else may be making it not work. I can't test it in build or edit mode, so i have to keep going from edit to play.
Report Abuse
NXTBoy is not online. NXTBoy
Joined: 25 Aug 2008
Total Posts: 4533
10 Jun 2012 09:40 AM
You're missing an end:

    function player()
        wait(1)
        script.Parent.Parent.Output.Line1.Text = "Test1"
        wait(1)
        script.Parent.Parent.Output.Line2.Text = "Test2"
        wait(1)
    end
    script.Parent.MouseEnter:connect(player)

You can also rewrite that as:

    local gui = script.Parent
    script.Parent.MouseEnter:connect(function()
        wait(1)
        gui.Parent.Output.Line1.Text = "Test1"
        wait(1)
        gui.Parent.Output.Line2.Text = "Test2"
        wait(1)
    end)
Report Abuse
epicpatrick123 is not online. epicpatrick123
Joined: 08 Sep 2010
Total Posts: 15039
10 Jun 2012 09:52 AM
Works, Thanks.
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