Roblox Tweenservice bugging

I was making slidng UI untill this happen
https://gyazo.com/4bafb512b36de7f0811297b79bae5dc2

Script:
wait(1)

local T = script.Parent
local on = false
local f = script.Parent.Parent.Parent.Parent.TeamChanger.Teams

function click()

	if on==false then

		on=true

		f:TweenPosition(UDim2.new(0.098, 0,0.806, 0),"Out","Quint",1) --Change to the position your gui will be when its open!


	else

		on=false

		f:TweenPosition(UDim2.new(-0.098, 0,0.806, 0),"Out","Quint",1)
	end

end



script.Parent.MouseButton1Click:connect(click)

What’s going on, any fixes? Sorry for the bad post first time using this.

1 Like
script.Parent.Loadin1.barImg:TweenSize(UDim2.new(1, 0, 1, 0), "Out", "Linear", 25, true)
script.Parent.Loadin1.barImg:TweenPosition(UDim2.new(1, 0, 1, 0), "Out", "Linear", 25, true)

You forgot “true”

3 Likes

That didn’t work out. Any other solves?

2 Likes

Probably the EndPosition is the issue, you may’ve given it the wrong Y scale, There’s nothing wrong with it here as it looks to be the tween for the Teams gui. May we see the script that handles the menu tween?

2 Likes

It’s same as the team script. So yeah

1 Like

Look at the docs. I’m not sure as that works for me.

2 Likes

Then it probably requires a change on EndPosition since the tween position can be different depending on where it is parented and what not. Tweak the EndPosition for the Menu tween till it is what you want

2 Likes

How I change the Endposition? And Also how to change like the team thing come from bottom not from top

1 Like

You just have to tweak around the

UDim2.new(0.098, 0,0.806, 0)

Till you get desired results. Although

UDim2.fromScale(0.098,0.806)

Is nicer to look at as you don’t really use the offsets, just the scales.

2 Likes

That made the menu go up not like how it was.

2 Likes

instead of say “Out” and “Quint” say,

Enum.EasingDirection.Out -- gives you all the options when you write it out which is cool

and

Enum.EasingStyle.Quint -- replace "Quint" with this try typing this out if you can

Thanks for reading! :happy2:

1 Like

i tried to fix, worked on my end:

local T = script.Parent
local on = false
local f = script.Parent.Parent.Parent.Parent.TeamChanger.Teams

script.Parent.MouseButton1Click:Connect(function()

	if on==false then

		on=true

		f:TweenPosition(UDim2.new(0.098, 0,0.806, 0),"Out","Quint",1) --Change to the position your gui will be when its open!


	else

		on=false

		f:TweenPosition(UDim2.new(-0.098, 0,0.806, 0),"Out","Quint",1)
	end

end)