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

Why won't my frame update when I press the button even though it works??

So I'm making a game right and I have a menu where the player can pick their classes you know the typical RPG game but the problem is the script works right but the frame that I want to animate doesn't work but there are no errors at all. Here is the script. I was going to share a pic of Roblox studio but I don't know how to upload photos to this website. I thank anyone who is willing to help me. So I checked the frame and the script works the frame moves when I press the button but it doesn't update the original frame just stays there.

local textButton = script.Parent

textButton.MouseButton1Click:Connect(function()
		local frame = script.Parent.Parent.Parent.Parent.ClassPickerGui.ClassPick
		frame:TweenPosition(UDim2.new(0.879,0,0,0))
		frame.Visible = true
end)


2 comments

0

Please explain what are you trying to do, I didn't understand.

0

sorry the code i inputted is a little buggy in this website, it doesn't get all inside the form

1 answer

local TextButton = script.Parent

local frame = script.Parent.Parent.Parent.Parent.ClassPickerGui.ClassPick

TextButton.MouseButton1Click:Connect(function()

frame:TweenPosition(
	UDim2.new(0.879,0,0,0),
	"Out",
	"Quad",
	0.5,
	true,
	nil
)

end)

-- What you missed is basically some other paremeters that you need to tween the UI --Apart from the end position, you need the EasingStyle, EasingDirection, Time in seconds, Tween overlap and a nil value for some reason (input nil only if you input UI Overlap to true)

4 comments

0

If this doesn't really work, show me all of your UI workspace so i can see how i can help

0

Sorry for not replying early but scripting helped wasn't really working ketp giving the error 504. I'll try it out tmr rn I don't have time. Thank you.

0

It worked thx but how do i decrease it's speed. It's so fast.

0

just get the time in seconds from 0.5 to 1 if you want

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