I am trying to make my scrolling frame slide in but it doesn't work. Is this because it's a scrolling frame or just because of my script. If you want to see my script here it is:
mouse = game.Players.LocalPlayer:GetMouse()
open = false
script.Parent.MouseButton1Down:connect(function()
if open == false then
open = true
script.Parent.Parent.Frame:TweenPosition(UDim2.new(0.3,0,0.2,0),"In","Back",2,true)
end
if open == true then
open = false
script.Parent.Parent.Frame:TweenPosition(UDim2.new(0.3,0,1,0),"Out","Linear",1,true)
end
end)
mouse.KeyDown:connect(function(key)
if key == "q" then
if open == false then
open = true
script.Parent.Parent.Frame:TweenPosition(UDim2.new(0.3,0,0.2,0),"In","Back",2,true)
end
if open == true then
open = false
script.Parent.Parent.Frame:TweenPosition(UDim2.new(0.3,0,1,0),"Out","Linear",1,true)
end
end
end)

1 comment
You may want to do 'key:lower()' just to make sure it's lower case.