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

Why wont the position of my Frame move?

Asked by 8 years ago
currentgame = script.Parent.Parent.Parent -- all these don't need to be local, unless they are in a function or an if statement or a loop.
menu = script.Parent
play = script.Parent.Play
quit = script.Parent.Quit
upgrades = script.Parent.Upgrades
quitmenu = script.Parent.Parent.Quit
upgradesmenu = script.Parent.Parent.Upgrades
gamemenu = script.Parent.Parent.Game

play.MouseButton1Down:connect(function()--event
    if currentgame.Visible then--no need for == true
        gamemenu.Visible = true
        menu.Visible = false
    end
end)

quit.MouseButton1Down:connect(function()
    if currentgame.Visible then
        quitmenu.Visible = true
--Why wont the menu frame move? vvvvvvvvvvvvvvv
    menu:TweenPosition(UDim2.new(0, 800, 0, 100))
--Why wont the menu frame move? ^^^^^^^^^^^^^^^
        quitmenu:TweenPosition(UDim2.new(0, 200, 0, 100))
    end
    quitmenu.Yes.MouseButton1Down:connect(function()
            menu:TweenPosition(UDim2.new(0, -400, 0, 100))
            quitmenu:TweenPosition(UDim2.new(0, -400, 0, 100))
            quitmenu.Visible = false
            menu.Visible = true
            currentgame.Visible = false
            currentgame.Parent.Parent.Apps.Visible = true
        end)

        quitmenu.No.MouseButton1Down:connect(function()
            menu.Visible = true
            wait(.001)
            menu:TweenPosition(UDim2.new(0, 250, 0, 100))
            quitmenu:TweenPosition(UDim2.new(0, -400, 0, 100))
            wait(5)
            quitmenu.Visible = false
        end)
end)

I pointed out in the code where I don't know why it wont move...

Please help, thanks!

P.S. The frame after it moves, (quitmenu:TweenPosition(UDim2.new(0, 200, 0, 100))) ??????

0
Is FilteringEnabled on, and is this a server script or LocalScript? M39a9am3R 3210 — 8y
0
FilteringEnabled is off, and this is a server script UnknownGenerations 10 — 8y
0
for tween position your missing a couple of parameters that could be the problem ProfessorSev 220 — 8y

Answer this question