How would I move this?

Hi, I am scripting a system like Murder Mystery 2, it opens a crate and goes through each crate in the GUI, I just need help moving the frame and the selector(a line), I got an image:


Help is very appreciated.

2 Likes

Make another frame with sizes (1,0,1,0)
And put the crate frames into it and then just tween.

Tween to what…? I don’t know.

Move the frame to the position you would like it to tween to, copy the position, undo it so it goes back, then tween the frame to that position.

I don’t understand what you’re trying to say. Please provide any code samples.

You need to do something like this:

Frame:TweenPosition(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Linear,1) -- Change the position where it says 0,0,0,0, and change the 1 at the end to how long the tween should last.

I know how to tween them, but basically how am I able to tween it, when I tween the frame the childs of it will also move with it. How?!

Make a main frame, with all the other frames in it, tween that and they will all move with it.

There is a holder that keeps all the crates in it

Then, you should just tween that.

Still not sure how I tween it. (Sorry if I am annoying.)

But you’re saying that you don’t know how to…

You just need to Tween that, like this:

HolderFrame:TweenPosition(UDim2.new(0,0,0,0),Enum.EasingDirection.Out,Enum.EasingStyle.Linear,1) -- Change the position where it says 0,0,0,0, and change the 1 at the end to how long the tween should last.

Obviously, change HolderFrame to your holder frame.

What? Just to UDim2.new(0, 0, 0, 0)?

Move your holder frame to the Position you want it to tween to (you can drag it) Copy the position, then, press Control Z or the undo button, so your gui goes back to the centre. Then, delete the 0,0,0,0, and replace it with the position you copied, remove all the {} brackets.

It kinda works, but not as I wanted it to.

There is a open source game for that, going to try that.

Could you possibly elaborate? What do you mean “but not as I wanted it to”?