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: More GUI help

Previous Thread :: Next Thread 
pwnful is not online. pwnful
Joined: 03 Oct 2008
Total Posts: 10505
26 Sep 2009 02:43 PM
A non-working GUI script. Whats wrong with it?

_______________________________________________________________

if Parent.event = MouseButton1Down()
then

local i = (math.random(1,10))

if i = 1 then
script.Parent.Text = ("This game rox!")
else

if i = 2 then
script.Parent.Text = ("This game su-(Asplodes)")
else

if i = 3 then
script.Parent.Text = ("I wish there were carts")
else

if i = 4 then
script.Parent.Text = ("I shall imprison you!")
else

if i = 5 then
script.Parent.Text = ("TI>< Pl0><")
else

if i = 6 then
script.Parent.Text = ("Wowsham kills!")
else

if i = 7 then
script.Parent.Text = ("1x1x1x1- Killer or MOD?")
else

if i = 8 then
script.Parent.Text = ("Ohaider")
else

if i = 9 then
script.Parent.Text = ("All toasters toast toast!")
else

if i = 10 then
script.Parent.Text = ("Tonight, The Bloxxers Live!")

wait(3)

script.Parent.Text = ("Talk to me. I'm your pet.")
____________________________________________________________________

Its supposed to make a GUI space "Talk" to you when you click it. It's supposed to achieve this by generating a random number from 1 - 10, and depending on the number, the name changes. I think the MouseButton1Down event is what's broken, because it does nothing.

Halp!
Report Abuse
Cheeks2819 is not online. Cheeks2819
Joined: 13 Jan 2009
Total Posts: 2598
26 Sep 2009 02:46 PM
if Parent.event = MouseButton1Down()
then

local i = (math.random(1,10))

if i = 1 then
script.Parent.Text = ("This game rox!")
else

if i = 2 then
script.Parent.Text = ("This game su-(Asplodes)")
elseif
i = 3 then
script.Parent.Text = ("I wish there were carts")
elseif
i = 4 then
script.Parent.Text = ("I shall imprison you!")
elseif
i = 5 then
script.Parent.Text = ("TI>< Pl0><")
elseif
i = 6 then
script.Parent.Text = ("Wowsham kills!")
elseif
i = 7 then
script.Parent.Text = ("1x1x1x1- Killer or MOD?")
elseif
i = 8 then
script.Parent.Text = ("Ohaider")
elseif
i = 9 then
script.Parent.Text = ("All toasters toast toast!")
elseif
i = 10 then
script.Parent.Text = ("Tonight, The Bloxxers Live!")

wait(3)

script.Parent.Text = ("Talk to me. I'm your pet.")
Report Abuse
blocco is not online. blocco
Joined: 14 Aug 2008
Total Posts: 29474
26 Sep 2009 02:47 PM
Cheeks did barely anything to help the poor guy.
Report Abuse
ElectricAxel is not online. ElectricAxel
Joined: 15 May 2009
Total Posts: 16239
26 Sep 2009 02:49 PM
script.Parent.MouseButton1Click:connect(function()
local i = (math.random(1,10))
if i = 1 then
script.Parent.Text = ("This game rox!")
elseif i = 2 then
script.Parent.Text = ("This game su-(Asplodes)")
elseif i = 3 then
script.Parent.Text = ("I wish there were carts")
elseif i = 4 then
script.Parent.Text = ("I shall imprison you!")
elseif i = 5 then
script.Parent.Text = ("TI>< Pl0><")
elseif i = 6 then
script.Parent.Text = ("Wowsham kills!")
elseif i = 7 then
script.Parent.Text = ("1x1x1x1- Killer or MOD?")
elseif i = 8 then
script.Parent.Text = ("Ohaider")
elseif i = 9 then
script.Parent.Text = ("All toasters toast toast!")
elseif i = 10 then
script.Parent.Text = ("Tonight, The Bloxxers Live!")
end
wait(3)
script.Parent.Text = ("Talk to me. I'm your pet.")
end)
Report Abuse
blocco is not online. blocco
Joined: 14 Aug 2008
Total Posts: 29474
26 Sep 2009 02:50 PM
electric... ever used tables?
Report Abuse
pwnful is not online. pwnful
Joined: 03 Oct 2008
Total Posts: 10505
26 Sep 2009 02:52 PM
Neither worked >_>
Report Abuse
ElectricAxel is not online. ElectricAxel
Joined: 15 May 2009
Total Posts: 16239
26 Sep 2009 02:53 PM
i just copied his, you really think i'll rewrite all that? PFFF no thanks xD
Report Abuse
blocco is not online. blocco
Joined: 14 Aug 2008
Total Posts: 29474
26 Sep 2009 02:55 PM
stuff={"This game rox!","This game su-(Asplodes)","I wish there were carts","I shall imprison you!","TI>< Pl0><","Wowsham kills!","1x1x1x1- Killer or MOD?","Ohaider","All toasters toast toast!","Tonight, The Bloxxers Live!"}

script.Parent.MouseButton1Click:connect(function()
local i = math.random(1,#stuff))
script.Parent.Text = stuff[i]
wait(3)
script.Parent.Text = ("Talk to me. I'm your pet.")
end)
Report Abuse
ElectricAxel is not online. ElectricAxel
Joined: 15 May 2009
Total Posts: 16239
26 Sep 2009 02:59 PM
i just noticed the () but i dun think that was the reason it didn't work?
Report Abuse
pwnful is not online. pwnful
Joined: 03 Oct 2008
Total Posts: 10505
26 Sep 2009 03:01 PM
Not even blocco's worked.
Wow O_O.
Report Abuse
blocco is not online. blocco
Joined: 14 Aug 2008
Total Posts: 29474
26 Sep 2009 03:01 PM
ph noes... i didn't take out the ( and )'s... just take that out and it'll be fine. But seriously... pwnful doesn't know how to make a string?
Report Abuse
nightname is not online. nightname
Joined: 10 Jun 2008
Total Posts: 8960
26 Sep 2009 03:03 PM
blocco made a few mistakes:

stuff = {"This game rox!", "This game su-(Asplodes)", "I wish there were carts", "I shall imprison you!", "TI>< Pl0><", "Wowsham kills!", "1x1x1x1- Killer or MOD?", "Ohaider", "All toasters toast toast!", "Tonight", "The Bloxxers Live!"}

script.Parent.MouseButton1Click:connect(function()
local i = math.random(1,#stuff))
script.Parent.Text = stuff[i]
wait(3)
script.Parent.Text = ("Talk to me. I'm your pet.")
end)
Report Abuse
pwnful is not online. pwnful
Joined: 03 Oct 2008
Total Posts: 10505
26 Sep 2009 03:03 PM
I wasn't thinking today...
Report Abuse
nightname is not online. nightname
Joined: 10 Jun 2008
Total Posts: 8960
26 Sep 2009 03:03 PM
@Blocco

you forgot some "s thats why Tonight was a nil vaule.
Report Abuse
blocco is not online. blocco
Joined: 14 Aug 2008
Total Posts: 29474
26 Sep 2009 03:05 PM
I copyed and pasted... i didn't forget the "'s... It just didn't copy.
Report Abuse
nightname is not online. nightname
Joined: 10 Jun 2008
Total Posts: 8960
26 Sep 2009 03:07 PM
@Blocco

Oops late post. Anyway yes you did make a mistake with the () but i think you know.
Report Abuse
pwnful is not online. pwnful
Joined: 03 Oct 2008
Total Posts: 10505
26 Sep 2009 03:08 PM
I think I'll just abandon this... Nothing's working.

But thanks for the slap in the face about strings.
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