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 » Scripters
Home Search
 

Re: Why doesn't this do anything?

Previous Thread :: Next Thread 
Vritix is not online. Vritix
Joined: 01 Jan 2011
Total Posts: 2790
21 May 2015 07:02 PM
No errors in output, no errors in developer console..

local cup = script.Parent.Parent.Cup
local gui = script.Parent.Parent.Screen.MainScreen.Background.CoffeeChoices
for _,one in pairs(gui:GetChildren()) do
if one:IsA("TextButton") then
gui.MouseButton1Down:connect(function()
cup.Enabled = true
cup:Clone()
cup.Parent = storage
cup.Name = one.Name
end)
end
Report Abuse
Vritix is not online. Vritix
Joined: 01 Jan 2011
Total Posts: 2790
21 May 2015 07:11 PM
bump
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
21 May 2015 07:16 PM
what is "storage"
Report Abuse
Vritix is not online. Vritix
Joined: 01 Jan 2011
Total Posts: 2790
21 May 2015 07:18 PM
sorry, forgot to put in post.. but it is in the script

local storage = script.Parent.Parent.Storage
Report Abuse
rayk999 is not online. rayk999
Joined: 18 Feb 2011
Total Posts: 4705
21 May 2015 07:18 PM
Use :WaitForChild() a lot
Report Abuse
Vritix is not online. Vritix
Joined: 01 Jan 2011
Total Posts: 2790
21 May 2015 07:21 PM
I don't want to use :WaitForChild since their is multiple 'TextButtons'...


this should be working fine but it doesn't..
Report Abuse
Vritix is not online. Vritix
Joined: 01 Jan 2011
Total Posts: 2790
21 May 2015 07:27 PM
bump2
Report Abuse
Vritix is not online. Vritix
Joined: 01 Jan 2011
Total Posts: 2790
21 May 2015 07:32 PM
bump3
Report Abuse
Vritix is not online. Vritix
Joined: 01 Jan 2011
Total Posts: 2790
21 May 2015 08:21 PM
bump4
Report Abuse
Vritix is not online. Vritix
Joined: 01 Jan 2011
Total Posts: 2790
21 May 2015 08:27 PM
bump4..
Report Abuse
Vritix is not online. Vritix
Joined: 01 Jan 2011
Total Posts: 2790
21 May 2015 08:31 PM
bump5
Report Abuse
CrowClaws is not online. CrowClaws
Joined: 04 Jul 2010
Total Posts: 4466
21 May 2015 08:32 PM
use WaitForChild

It fixes almost all problems with loading
Report Abuse
Vritix is not online. Vritix
Joined: 01 Jan 2011
Total Posts: 2790
21 May 2015 08:47 PM
but their is multiple childs
Report Abuse
Vritix is not online. Vritix
Joined: 01 Jan 2011
Total Posts: 2790
21 May 2015 09:20 PM
bump6
Report Abuse
Vritix is not online. Vritix
Joined: 01 Jan 2011
Total Posts: 2790
21 May 2015 11:32 PM
bump7
Report Abuse
DeviousDeviation is not online. DeviousDeviation
Joined: 28 Dec 2010
Total Posts: 9306
21 May 2015 11:45 PM
use waitforchild

u should add filtering - devious
Report Abuse
Vritix is not online. Vritix
Joined: 01 Jan 2011
Total Posts: 2790
21 May 2015 11:53 PM
WaitForChild didn't fix it, still not doing anything...
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
22 May 2015 12:02 AM
Try this

local cup = script.Parent.Parent.Cup
local gui = script.Parent.Parent.Screen.MainScreen.Background.CoffeeChoices
local storage = script.Parent.Parent.Storage

function onClick()
for i, v in pairs(gui:GetChildren()) do
if v:IsA("TextButton") then
cup.Enabled = true
cup:Clone()
cup.Parent = storage
cup.Name = v.Name
end
end
end

gui.MouseButton1Down:connect(onClick)
Report Abuse
CrowClaws is not online. CrowClaws
Joined: 04 Jul 2010
Total Posts: 4466
22 May 2015 12:03 AM
local cup = script.Parent.Parent.Cup
local gui = script.Parent.Parent.Screen.MainScreen.Background.CoffeeChoices
for _,one in pairs(gui:GetChildren()) do
if one:IsA("TextButton") then
one.MouseButton1Down:connect(function() -- lol noob u have to use one not gui
cup.Enabled = true
cup:Clone()
cup.Parent = storage
cup.Name = one.Name
end)
end
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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