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

What's the most efficient way to store UDim2 values?

I'm trying to figure out how I can store a frame's position for later use. I was wondering if there are any "Value" objects I can store them in.

It would be GREAT if I could just do:

Frame.Position = ObjectValue.Value

But, I can't seem to be able to find anything that will work to store the value!

Edit: tried to use stringValue, got: "bad argument #3 to 'Value' (string expected, got UDim2)"

3 comments

0

Using a string value should work perfectly fine, as it can hold any character or number on your keyboard. Sadly I can't test this in studio which is why it's a comment and not an answer

0

Check my edit.

0

What is wrong with storing it as a variable?

1 answer

You shouldn't use ValueObjects if possible. Use a variable. Use a table. Replicate it to the client with a RemoteEvent. Please do anything except use a Value Object.

local OldPositionFrame = Frame.Position -- Saved for later!

1 comment

0

Ikr. Why are people so obsessed with using Values instances?

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