Problems with Tweening

This is my first time using the forum so if I do something wrong tell me.

  1. What do you want to achieve? Keep it simple and clear!
    After I click a button, I want that button and others to tween offscreen as the camera faces a kind of mission board

  2. What is the issue? Include screenshots / videos if possible!
    I have another tween that whenever you hover over one of the buttons it will come out a little bit and then returns when the mouse has left, but this is messing up the tween when you click one of the buttons. If your mouse doesn’t leave the area where the button previously was fast enough then the button will come zooming back and is out of place.

  1. What solutions have you tried so far? Did you look for solutions on the Developer Hub?
    I have tried looking up for other similar things on the Developer Hub but I haven’t really been able to find anything like my problem. I’ve also tried checking to see if the tween is playing so I can stop the mouseEnter/Leave but that doesn’t help either.
1 Like

can I see the code responsible for the tweening, and activation of the buttons? thanks

2 Likes

alright but theres not a lot

MissionsButton.MouseLeave:Connect(function()
	TweenService:Create(MissionsButton, TweenInfo.new(0.1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {Position = UDim2.new(0.05, 0, 0.55, 0)}):Play()
end)

for now I have only used the tweenservice for the missions button

MissionsButton.MouseButton1Click:Connect(function()	
	TweenService:Create(Camera, TweenInfo.new(0.75, Enum.EasingStyle.Back, Enum.EasingDirection.Out), {CFrame = CFrame.new(camPart2.Position, camPoint2.Position)}):Play()
	RaidsButton:TweenPosition(UDim2.new(-0.5, 0, 0.35, 0), Enum.EasingDirection.In, Enum.EasingStyle.Back, 0.5, true)
	MissionTween:Play()
	OrdersButton:TweenPosition(UDim2.new(-0.5, 0, 0.45, 0), Enum.EasingDirection.In, Enum.EasingStyle.Back, 1, true)
	CloseButton:TweenPosition(UDim2.new(-0.5, 0, 0.65, 0), Enum.EasingDirection.In, Enum.EasingStyle.Back, 2, true)
	DialogBox:TweenPosition(UDim2.new(0.33, 0, 1.05, 0), Enum.EasingDirection.In, Enum.EasingStyle.Back, 1.5, true)
end)
2 Likes

you need to make a bool value (ture/fasle). set it to trueby default and name it smthn like, “inMenu”. when you click the buttons you need to set it to false. for the mouse leaving and entering tweens, you need to check if the player is in the menu, if they are then you can tween, otherwise do nothing. when the player goes back to the menu, you can set the “inMenu” value back to true, so the hover tween works.

3 Likes

that was a lot easier than I thought it would be lol

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.