Setting the DPanel at the center of the screen...

Hello, I want to put my DPanel at the center of the screen, but I dont know how. Can anyone help me?


I put this instead of panel:SetPos and it will put it in the center of the screen?


seriously, how hard is it to change a line then try the script?

Dude, i dont think the computer at my school have gmod…

Or try panel:SetPos(ScrW()/2,ScrH()/2)

[lua]panel:SetPos(ScrW()/2 - panel:GetWide()/2, ScrH()/2 - panel:GetTall()/2)[/lua]

This is what exactly what I tried before posting here…