i'm trying to make a keybind for a phone gui I made and I want the phone to slide up when P is clicked then slide down when its clicked again, if someone can help me that'd be great, I tested it with it open and it slides down correctly, but it doesn't slide up
Code:
local Player = game.Players.LocalPlayer
local Mouse = Player:GetMouse()
local Phone = script.Parent.PhoneMainFrame
Mouse.KeyDown:connect(function(key)
key = string.lower(key)
if string.byte(key) == "p" then
Phone:TweenPosition(UDim2.new(1, -210,1, -400),"InOut", "Quad", .5, true)
else
Phone:TweenPosition(UDim2.new(1, -210,1, -50),"InOut", "Quad", .5, true)
end
end)
