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
 

I am clearly doing something wrong here.

Previous Thread :: Next Thread 
Pro_JC is online. Pro_JC
Joined: 08 Jul 2011
Total Posts: 2701
30 Jul 2017 04:12 PM
Trying to create an ImageButton within a Frame but only if the Task Google is open.

if script.Parent.Parent.Parent.Background.Tabs.GoogleTab.Visible == true then
local App = Instance.new("ImageButton",script.Parent)
script.Parent.ImageButton.Name = 'GoogleApp'
script.Parent.GoogleApp.Zindex = 7
end


Pineapples do not belong on Pizza
Report Abuse
devHoodie is online. devHoodie
Joined: 04 Nov 2008
Total Posts: 30332
30 Jul 2017 04:27 PM
first off

instead of doing this

local App = Instance.new("ImageButton",script.Parent)
script.Parent.ImageButton.Name = 'GoogleApp'
script.Parent.GoogleApp.Zindex = 7

you can do this

local App = Instance.new("ImageButton",script.Parent)
App.Name = 'GoogleApp'
App.Zindex = 7

Also, look inside explorer in studio and tell me if it's there or not.
Report Abuse
Pro_JC is online. Pro_JC
Joined: 08 Jul 2011
Total Posts: 2701
30 Jul 2017 04:33 PM
Well, I played around with it and I got it to work. It's the 'if' statement that stops it from opening.


Pineapples do not belong on Pizza
Report Abuse
Pro_JC is online. Pro_JC
Joined: 08 Jul 2011
Total Posts: 2701
30 Jul 2017 04:49 PM
I don't understand how that IF statement stops the entire script from functioning...

if script.Parent.Parent.Parent.Background.Tabs.GoogleTab.Visible == true then
wait(1)
local App = script.Parent

local Taskapp = Instance.new("ImageButton",App)
App.ImageButton.Name = 'GoogleApp'
App.GoogleApp.ZIndex = 7
App.GoogleApp.Size = UDim2.new(0,50,0,50)
App.GoogleApp.BorderSizePixel = 0
App.GoogleApp.BackgroundTransparency = 0.5
App.GoogleApp.Image = ''
end



Pineapples do not belong on Pizza
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