Opening frame script not working due to HTTP 400?

Howdy DevForum Members. I have a bit of a problem. I made this textbutton TweenPosition to open a frame. But it is not working, and I am getting a error in the out put that says. "FriendPages: Request Failed because HTTP 400 (Bad Request). I am not sure if the error is causing that or not. But here is the script.

local frame = script.Parent.Parent.Parent.AvatarFrame
script.Parent.MouseButton1Click:Connect(function()
	frame:TweenPosition(UDim2.new(0.381, 0,0.144, 0), "In", "Quad", .25, true)
end)

You haven’t made the Frame visible in the function.

The Frame is visible. (This is a local script btw) The frame is just not in screen the position is out of the screen. And this script usually works for me. I even tested it for it to play an audio and it did not work. I am not sure if the button is broken or something.

Ok. Soon as though its a LocalScript. When defining the frame, use :WaitForChild() which waits until the frame has loaded.

There is a community tutorial covering how to use :TweenPosition which may help you with position your frame when the clicked functions executes:

https://devforum.roblox.com/t/a-guide-to-using-tweenposition-for-beginners/723231

Thank you so much, this really helps.

1 Like