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

Why does the cards not go down when going left to right?

I am trying to make the cards tween up when you hover over the gui with your cursor and go back down when your cursor is out of the gui. I have 5 gui in this so far for testing and when i hover my mouse left to right the cards doesn't go down. When I go right to left it works as intended. "https://media.giphy.com/media/mYRz7WU09iY51e6M5S/giphy.gif" <---- (a gif to show what I mean)

local object = script.Parent
local objectx = object.Position.X.Scale



object.MouseEnter:Connect(function()
	object:TweenPosition(
		UDim2.new(objectx, 0, 0.6, 0),
		nil,
		nil,
		0.3,
		true
	)
end)

object.MouseLeave:Connect(function()
	object:TweenPosition(
		UDim2.new(objectx, 0, 0.735, 0),
		nil,
		nil,
		0.3,
		true
	)
end)

Is there a way to fix this so that the cards go down one by one like it did when going right to left?

2 comments

0

Any errors in the output?

0

There are no errors in the output

1 answer

You don't have to put 'nil' for the empty values.

object.MouseEnter:Connect(function()
    object:TweenPosition(
        UDim2.new(objectx, 0, 0.6, 0),
        0.3
    )
end)

object.MouseLeave:Connect(function()
    object:TweenPosition(
        UDim2.new(objectx, 0, 0.735, 0),
        0.3
    )
end)

1 comment

0

thanks for the info, but it doesn't seem to solve it though

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