Tween won't work, no errors showing up as well

I’m trying to make a chapter GUI/Frame move down when a button is pressed.

Despite there being no errors, it isn’t working. When I open explorer and select the frame so it’s highlighted, when the tween is triggered, the highlight is brought down but the GUI itself doesn’t.
https://gyazo.com/3a95ea4ffe5ed5e0b00d5bc8e2a77675 (the gui that’s supposed to be brought down is the white box, the white outline in the end is the highlight)

I’ve looked for solutions, but I haven’t found any tween script support topics that relate to my specific problem. Changing it to a normal script didn’t help either.

the localscript inside the button

local framebit = game.StarterGui.ChapterSelect.Frame
local button = script.Parent

button.MouseButton1Click:Connect(function()
	framebit:TweenPosition(
		UDim2.new(0.5, 0, 0.5, 0),
		"Out",
		"Back",
		1,
		true
	)
end)

Have you tried printing out something in the mouse button function?

I see “Game.StarterGui”, this is your problem.
You should try accessing the gui in the players PlayerGui.

1 Like

If nothing prints, then your button function isn’t working.

Ignore what I said. Try @roblon999’s solution.

Please give more information, like where your scripts are and where everything is stored.
Send a screenshot of your code.

image

Can you send a screenshot of your code?

It’s in the topic, but ill send a screenshot
image
I set game.PlayerGUI from starter because of roblons instructions

You’re trying to get PlayerGui from game. You need to get it from the player.

local Player = game.Players.LocalPlayer
local PlayerGui = Player:WaitForChild("PlayerGui")
1 Like


i dont even know what this error means, it is there

Try: local CharacterSelect = PlayerGui:WaitForChild("CharacterSelect")

I accidentally put “Character” not “Chapter”

2 Likes

Use :WaitForChild
so PlayerGui:WaitForChild(“ChapterSelect”):WaitForChild("Frame)

Put this in with the others and it worked (chapterselect instead of characterselect). Problem solved.

1 Like

dont say startergui.RandomName
say plr.PlayerGui.Screenguiname
or do it the long way
local plr = game.Players.LocalPlaer
local plrgui = plr.PlayerGui
local screengui = plrgui.ScreenGuiname