Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Frame is not a valid member of ImageLabel. Why?

script.Parent.Frame.Position = UDim2.new(0.5, 0, 0.5, 0)
script.Parent.Frame.Size = UDim2.new(0,0,0,0) 
script.Parent.Frame:TweenSizeAndPosition(UDim2.new(0, 400, 0, 600), UDim2.new(.5, -200, .5, 600), "Linear", 1) 

The first line is the one that is not working. The LocalScript is in StarterGui > Frame > ImageLabel. I'm trying to get my ImageLabel to tween.

2 comments

0

Given that the Frame is inside of the ImageLabel all you need to say is: script.Parent because when you put another dot at the end it will look for something inside of the parent. So it would look for a frame where the frame is not.

0

tl;dr: if the script is inside of the imagelabel you should do script.Parent.Parent instead of script.Parent.Frame

1 answer

if what you said is true,

"The LocalScript is in StarterGui > Frame > ImageLabel"

then script.Parent only reaches ImageLabel you need script.Parent.Parent in order to reach Frame

This discussion is preserved as it was. New answers, comments, and votes are closed.