I want to make a script for a leaderboard that tweens in or out when you press v. This is the OutPut. 12:55:43.630 - Players.Player1.PlayerGui.ScreenGui.MainOpener.open and close:7: attempt to call a userdata value
Frame = script.Parent.Parent.MainFrame
plr = game.Players.LocalPlayer
mouse = plr:GetMouse()
mouse.KeyDown:connect(function(key)
if key == "v" or key == "V" then
if Frame.Position == UDim2.new(.45,0,.1,0) then
Frame:TweenPosition(UDim2.new(1.2,0,.1,0)"Out","Bounce",1.2)
elseif Frame.Position == UDim2.new(1.2,0,.1,0) then
Frame:TweenPosition(UDim2.new(.45,0,.1,0)"Out","Bounce",1.2)
end
end
end)

4 comments
It does not work but it does not give an output
Hm, have you placed it in a LocalScript? and does frame point to the correct frame? It does not work in a normal script im afraid.
Sorry..... i had a different method of getting of getting the leaderboard there by turning the visibility off and on and i had it to start off Sorry :(
It's alright.