Help with DFrame:MakePopup()

So let me explain my problem. I’m trying to create a DFrame that is very small and has no room for a close button keep this in mind. It also has to be draggable but when I set it too draggable, its not draggable at all. So after a while I realized I had no MakePopup in my DFrame, so I put one in and Hooray it was draggable. Sad to say thats not the end, the MakePopup kept me from being able to look around or use my keyboard (other than pressing escape etc). So I tried everything to fix this and so far I have nothing. So for a last resort I came here too ask for help. All I want is a dang draggable frame that doesn’t keep me from using my mouse. Thanks to anyone who helps.


local CrimeFrame = vgui.Create( "DFrame" )
CrimeFrame:SetDraggable( framedraggable ) -- Makes the frame draggable
CrimeFrame:ShowCloseButton( false ) --Disables close button on Crime frame
CrimeFrame:SetSize( 95, 25 ) -- sets the size on Crime frame
CrimeFrame:SetTitle("") -- Sets Title to nothing, Keep blank
CrimeFrame:MakePopup()

Doesn’t work in Single player or Multiplayer! Sorry for the mistake I made earlier!



CrimeFrame:SetDraggable( framedraggable ) -- Makes the frame draggable


Sorry, but what makes you think that’d make the frame draggable? You have to do this:



CrimeFrame:SetDraggable( true ) -- Makes the frame draggable


Doesn’t that make more sense? The wiki page:

DFrame:SetDraggable even specifically says it’s a boolean, not a weird variable called ‘framedraggable’.

Also, what do you expect MakePopup to do? How are you meant to drag the frame at all if you’re using your mouse to move the screen around to look around?

EDIT: Why is this dumb? I know the framedraggable thing wasn’t what he was having trouble with, but how are you supposed to drag a panel at the same time as looking around?

Thank you for your response. The variable is stored above that, it is set too true and too further explain how I would like it be dragged would be pressing F3 while playing DarkRP pulls up your mouse. Sorry for not making that a bit more clear

Where are you running this code and what file is it in?
In what instance i mean
And in what hook or function? When is it being created?
Do you see any errors in servers/clients console?