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

WTF Is my TweenPosition going to? Going to 0,0,0,0 while set to a different position...

So, At first, I'll place my script below.

wait()

Frame = script.Parent.Frame

Frame.Size = UDim2.new(1,0,1,0)

  

MainMenu = script.Parent.MainMenu

ChooseMode = script.Parent.ChooseMode

  

MainMenu.Position = UDim2.new(0.5, 0, 1.481, 0)

ChooseMode.Position = UDim2.new{0.5, 0,1.48, 0}

  

  

ChooseMode.Showing.Value = false

  

  

  

wait(5)

MainMenu:TweenPosition(UDim2.new{0.5, 0,0.481, 0})

print(MainMenu.Position)

wait(1)

print("MainMenu.Position =")

print(MainMenu.Position)

Ignore all unfinished stuff.

My problem is:

My MainMenu should tween towards 0.5, 0,0.481, 0

however, this game moves it towards nearly 0,0,0,0.

Just, like wtf!

Any clue, anyone?

Video In Studio Play Mode:https://www.youtube.com/watch?v=dUdEsKb4muY&feature=youtu.be

2 comments

0

You’re using {curly brackets} for your UDim2 value, which isn’t the correct format for it I’m pretty sure. Use (parenthesis) instead.

1

No need to take your anger out in the question, calm down on the abbreviations w profanity

1 answer

hey i don't know maybe its because you're using UDim2.new{a,b,c,d} instead of UDim2.new(a,b,c,d)

wild guess but y'know it might work :)

udim2.new is a function that returns a udim2 set, and HOLY CRAP!! functions require parenthesis to be called, not a curly bracket!!!

O_O!!!

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