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: If a certain image is visible, or transparency is 0,

Previous Thread :: Next Thread 
Blues714 is not online. Blues714
Joined: 23 Dec 2008
Total Posts: 6507
30 Aug 2014 01:22 AM
how would i return the function?

and if the image is invisible and/or the transparency is 1, it'll run the script?

What I've came up with, that doesn't really work.

if key == "m" then
if open then
print'player closed menu'
plr.CameraMode = Enum.CameraMode.LockFirstPerson
camera.CameraType = "Custom"
if script.Parent.buttons.player.ImageTransparency<0 then return end
Report Abuse
BJCarpenter is not online. BJCarpenter
Joined: 04 Nov 2008
Total Posts: 4416
30 Aug 2014 01:37 AM
I read ur post 5 times, and..... I still don't know......


if key == "m" then
if open then
print'player closed menu'
plr.CameraMode = Enum.CameraMode.LockFirstPerson
camera.CameraType = "Custom"
if script.Parent.buttons.player.ImageTransparency<0 then

SomeRandomScript.Disabled = false -- SRS, undefined, so define it..

return -- yeah this is superfluous....

end -- transparent?
end -- open?
end -- "M"?

--GL


Report Abuse
BJCarpenter is not online. BJCarpenter
Joined: 04 Nov 2008
Total Posts: 4416
30 Aug 2014 01:39 AM
*Umm .... sorry didn't notice that this line made no sense (Do u have Output > Open?


if script.Parent.buttons.player.ImageTransparency*........>.....0 then
Report Abuse
Blues714 is not online. Blues714
Joined: 23 Dec 2008
Total Posts: 6507
30 Aug 2014 01:40 AM
the one I gave is just a part of a script.

if key == "m" then
if open then
if script.Parent.buttons.player.ImageTransparency==0 then return end
elseif script.Parent.buttons.player.ImageTransparency==1 then
print'player closed menu'
plr.CameraMode = Enum.CameraMode.LockFirstPerson
camera.CameraType = "Custom"
script.Parent.buttons.player:TweenPosition(UDim2.new(0, 110, 0, -500), "Out", "Sine", nil, true) wait(0.2)
script.Parent.buttons.clan:TweenPosition(UDim2.new(0, 110, 0, -500), "Out", "Sine", nil, true) wait(0.2)
script.Parent.buttons.messages:TweenPosition(UDim2.new(0, 110, 0, -500), "Out", "Sine", nil, true) wait(0.2)
script.Parent.buttons.location:TweenPosition(UDim2.new(0, 110, 0, -500), "Out", "Sine", nil, true)
open = false
end end end end)

here's half of it. the other part ain't a problem.
Report Abuse
BJCarpenter is not online. BJCarpenter
Joined: 04 Nov 2008
Total Posts: 4416
30 Aug 2014 02:06 AM
Too tired to resd it, BUT, if u put a print statement at every other line, AND READ the Output, I GARUTEEE u will find the logic error..... Go on from my start....:

print ("Key", key == "m")
if key == "m" then

print ("Open:", open)
if open then

print...............and so on... GL...

if script.Parent.buttons.player.ImageTransparency==0 then return end
elseif script.Parent.buttons.player.ImageTransparency==1 then
print'player closed menu'
plr.CameraMode = Enum.CameraMode.LockFirstPerson
camera.CameraType = "Custom"
script.Parent.buttons.player:TweenPosition(UDim2.new(0, 110, 0, -500), "Out", "Sine", nil, true) wait(0.2)
script.Parent.buttons.clan:TweenPosition(UDim2.new(0, 110, 0, -500), "Out", "Sine", nil, true) wait(0.2)
script.Parent.buttons.messages:TweenPosition(UDim2.new(0, 110, 0, -500), "Out", "Sine", nil, true) wait(0.2)
script.Parent.buttons.location:TweenPosition(UDim2.new(0, 110, 0, -500), "Out", "Sine", nil, true)
open = false
end end end end)

Report Abuse
Blues714 is not online. Blues714
Joined: 23 Dec 2008
Total Posts: 6507
30 Aug 2014 02:09 AM
@BJ

the error is around

if script.Parent.buttons.player.ImageTransparency==0 then return end
elseif script.Parent.buttons.player.ImageTransparency==1 then

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