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
 

Gui Help

Previous Thread :: Next Thread 
TreBomb004 is online. TreBomb004
Joined: 09 Sep 2012
Total Posts: 339
02 Aug 2017 09:39 PM
Hey, it's me again... I have a script that works in Studio, but not Player. In Player, the error is:
Clothing is not a valid member of ScreenGui
Stack Begin
Script 'Players.TreBomb004.PlayerGui.Custom.Colors.Done.Done.LocalScript', Line 3
Stack End

Here's the code:

local frame = script.Parent.Parent.Parent
local gui = frame.Parent
local open = gui.Clothing

function OnClicked()
frame:TweenPosition(UDim2.new(0.001,0,2,0), 'Out', 'Bounce')
open:TweenPosition(UDim2.new(0.001,0,0.001,0), 'Out', 'Bounce')
end

script.Parent.MouseButton1Down:connect(OnClicked)


Report Abuse
systematicaddict is not online. systematicaddict
Joined: 13 Jul 2012
Total Posts: 4188
02 Aug 2017 09:47 PM
Well, if you're 100% sure that clothing IS a child of ScreenGui, just do a repeat wait() loop or something until those few variables aren't nil ( FindFirstChild() )
Report Abuse
TreBomb004 is online. TreBomb004
Joined: 09 Sep 2012
Total Posts: 339
02 Aug 2017 09:47 PM
Well I am pretty sure, considering it works in Studio. But I'll try that.


Report Abuse
TreBomb004 is online. TreBomb004
Joined: 09 Sep 2012
Total Posts: 339
02 Aug 2017 09:49 PM
Yeah I made it wait for the local player's character at the top and it works now lol. Thank you!


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