Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

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

Asked by 6 years ago
Edited 6 years ago

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)"

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 cmgtotalyawesome 1418 — 6y
0
Check my edit. CherryLeaves 32 — 6y
0
What is wrong with storing it as a variable? frostysubatomiczero 51 — 6y

1 answer

Log in to vote
1
Answered by
Validark 1580 Snack Break Moderation Voter
6 years ago

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!
0
Ikr. Why are people so obsessed with using Values instances? Amiaa16 3227 — 6y
Ad

Answer this question