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: Why isnt this line of code working?

Previous Thread :: Next Thread 
apom44 is not online. apom44
Joined: 30 Jun 2012
Total Posts: 252
01 May 2013 04:45 PM
script.Parent.Gasmask.Mask.Visible = true

A gui tool.
Report Abuse
getkoed2 is not online. getkoed2
Joined: 11 Apr 2010
Total Posts: 1144
01 May 2013 04:46 PM
If it's a part, I think you know why.

If it's a GUI object:
1) Is the BackgroundTransparency lower than 1?
2) Is the object's parent visible?
Report Abuse
apom44 is not online. apom44
Joined: 30 Jun 2012
Total Posts: 252
01 May 2013 04:56 PM
1: Background Transparent = 1 (May be the problem)
2: No.
Report Abuse
apom44 is not online. apom44
Joined: 30 Jun 2012
Total Posts: 252
01 May 2013 05:12 PM
Bump.
Report Abuse
SamuelKingx is not online. SamuelKingx
Joined: 27 Jan 2012
Total Posts: 3472
01 May 2013 05:14 PM
If something's Transparency is 1, you can't see it even if it's visible property is true.

~If you're generous enough: http://www.roblox.com/--item?id=97553537~
Report Abuse
getkoed2 is not online. getkoed2
Joined: 11 Apr 2010
Total Posts: 1144
01 May 2013 05:15 PM
If the background is transparent and the GUI object only shows as a background, yes, that is the problem...

And if the parent is invisible, how could that one possibly be visible :C
Report Abuse
apom44 is not online. apom44
Joined: 30 Jun 2012
Total Posts: 252
01 May 2013 05:16 PM
I'm not trying to make it so I can see, just so when it is visible another script works. (The gui script could be the problem)
Report Abuse
apom44 is not online. apom44
Joined: 30 Jun 2012
Total Posts: 252
01 May 2013 05:17 PM
*so i can see it
Report Abuse
getkoed2 is not online. getkoed2
Joined: 11 Apr 2010
Total Posts: 1144
01 May 2013 05:18 PM
Yes, the other script is obviously the problem because that line certainly works.

Have you already tried using this line and checking if the Visible property changes?

ALWAYS try solving the problem before posting or even bumping in SH please. :d
Report Abuse
apom44 is not online. apom44
Joined: 30 Jun 2012
Total Posts: 252
01 May 2013 05:20 PM
I'm testng as we speak.
Report Abuse
getkoed2 is not online. getkoed2
Joined: 11 Apr 2010
Total Posts: 1144
01 May 2013 05:21 PM
Well then you should've found out that the object would've become visible already.

Output?
Report Abuse
apom44 is not online. apom44
Joined: 30 Jun 2012
Total Posts: 252
01 May 2013 05:24 PM
Tool = script.Parent
Gui = Tool.Gasmask
function onActivated()
local vCharacter = Tool.Parent
local vPlayer = game.Players:playerFromCharacter(vCharacter)
if Gui.Parent ~= vPlayer.PlayerGui then

Gui.Parent = vPlayer.PlayerGui


Gui.Gasmask.Visible = true
end
end


script.Parent.Activated:connect(onActivated)

function Unequip()
Gui.Parent = Tool
end

Tool.Unequipped:connect(Unequip)

^^^
Gui clone script
and output wasn't very helpful
Report Abuse
nighttimeninja314 is not online. nighttimeninja314
Joined: 04 Apr 2011
Total Posts: 4001
01 May 2013 05:26 PM
Tool = script.Parent
Gui = Tool.Gasmask
function onActivated()
local vCharacter = Tool.Parent
local vPlayer = game.Players:playerFromCharacter(vCharacter)
if Gui.Parent ~= vPlayer.PlayerGui then

Gui.Parent = vPlayer.PlayerGui


Gui.Transperancy = 0
end
end


script.Parent.Activated:connect(onActivated)

function Unequip()
Gui.Parent = Tool
end

Tool.Unequipped:connect(Unequip)
Report Abuse
apom44 is not online. apom44
Joined: 30 Jun 2012
Total Posts: 252
01 May 2013 05:41 PM
Someone please help
Report Abuse
nighttimeninja314 is not online. nighttimeninja314
Joined: 04 Apr 2011
Total Posts: 4001
01 May 2013 05:49 PM
just did
Report Abuse
apom44 is not online. apom44
Joined: 30 Jun 2012
Total Posts: 252
01 May 2013 05:56 PM
didnt work I DONT WANT THE GUI TO SHOW I SIMPLY WANT IT TO TRIGGER SOMETHING ;c
Report Abuse
nighttimeninja314 is not online. nighttimeninja314
Joined: 04 Apr 2011
Total Posts: 4001
01 May 2013 08:24 PM
it isn't necessary to put Gui.GasMask, Gui is gasmask.
Report Abuse
apom44 is not online. apom44
Joined: 30 Jun 2012
Total Posts: 252
01 May 2013 09:54 PM
Part of it is named GasMask ;c
Report Abuse
nighttimeninja314 is not online. nighttimeninja314
Joined: 04 Apr 2011
Total Posts: 4001
02 May 2013 08:58 AM
oh
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