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

my gui script doesnt work? not solved yet

Asked by 9 years ago
function goLeft()
    script.Parent.Parent.CustomClass2.Position = UDim2.new(15, 0, 1.5, 0)
    script.Parent.Parent.CustomClass2.Visible = true
    if script.Parent.Parent.CustomClass2.Position == UDim2.new(15, 0, 1.5, 0) then
        for i = 1, 48 do
        wait(.05)
        script.Parent.Parent.CustomClass2.Position = script.Parent.Parent.CustomClass1.Position - UDim2.new( .25, 0, 0, 0)
        end
    end
end 
script.Parent.MouseButton1Down:connect(goLeft)

the script just immediately teleports the gui to the end poistion i want it to be, instead i wanted it to come from off the screen into the position, can someone please tell me why it doesnt work

1
You need Tweening. It's explained fairly well in the wiki. GoldenPhysics 474 — 9y

Answer this question