Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Frame is not a valid member of ImageLabel. Why?

Asked by 4 years ago
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.

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. namespace25 594 — 4y
0
tl;dr: if the script is inside of the imagelabel you should do script.Parent.Parent instead of script.Parent.Frame Fifkee 2017 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

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

Ad

Answer this question