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

Help with If Then and UDim2?

Asked by 9 years ago

I want the frame to reach the position (0,50,0,0) and print ok but it won't,why?

frame = script.Parent
wait(1)
print("Start")
frame:TweenPosition(UDim2.new(0,50,0,50),"Out","Bounce",1,false)
if frame.Position == UDim2.new(0,50,0,0)
    then
print("Ok")
end

Edited because I made a typo

1 answer

Log in to vote
0
Answered by 9 years ago

You put 0,50,0,50 not 0,50,0,60 You put the below Now it says

frame:TweenPosition(UDim2.new(0,50,0,0),"Out","Bounce",1,false)

not

frame:TweenPosition(UDim2.new(0,50,0,60),"Out","Bounce",1,false)

If you want it to raise please ask me.

WOrking script

frame = script.Parent
wait(5)
print("Start")
frame:TweenPosition(UDim2.new(0,50,0,50),"Out","Bounce",1,false)
wait(1)
if frame.Position == UDim2.new(0,50,0,50) then
print("Ok")
end

Put in script in a frame!!

0
By raise I mean it starts at 0,50,0,50 then goes up to 0,50,0,60 fireboltofdeath 635 — 9y
0
My bad kevinnight45 550 — 9y
0
Well please Accept Answer or at the least Up Vote, thanks! fireboltofdeath 635 — 9y
0
It still doesn't print... kevinnight45 550 — 9y
View all comments (13 more)
0
I'll give a working script then! fireboltofdeath 635 — 9y
0
It said 0,50,0,0 it says if frame.Position == UDim2.new(0,50,0,0) then fireboltofdeath 635 — 9y
0
wut kevinnight45 550 — 9y
0
Try the script I put in the answer. fireboltofdeath 635 — 9y
0
Okay, fixed it. Try the script below "WOrking script". fireboltofdeath 635 — 9y
0
I tried the new working script and it still didn't work. :l kevinnight45 550 — 9y
0
Worked for me. Did you put in localscript or script? fireboltofdeath 635 — 9y
0
script kevinnight45 550 — 9y
0
Do you want the model? kevinnight45 550 — 9y
0
Try it now. fireboltofdeath 635 — 9y
0
It works now,thanks. kevinnight45 550 — 9y
0
You're welcome! Oh and thanks for the thumbs up! fireboltofdeath 635 — 9y
0
Why did this get downvoted or why did you remove your upvote? fireboltofdeath 635 — 9y
Ad

Answer this question