I'm trying to make a popup gui with Tween animations, yet whenever I try inserting codes I think of, or codes that my friends give me, or even just searching it up, it doesn't work.
function PopupGui() if script.Parent.Visible == true then script.Parent.Visible = false else script.Parent.Visible = true end end
game:GetService("UserInputService").InputBegan:Connect(function(key) if key.KeyCode == Enum.KeyCode.M then PopupGui() end end)
this is the code i'm using. any advice?