|
| 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 |
|
|
| 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 |
|
|
| 02 Aug 2017 09:47 PM |
Well I am pretty sure, considering it works in Studio. But I'll try that.
|
|
|
| Report Abuse |
|
|
| 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 |
|