Player touching prop & Panel issue

May aswell contain these 2 questions in one topic:

This is what I currently have or what I have come up with to detect if a player is touching a prop:

[lua]
function ENT:Touch(e)
if e and e:IsValid() and e:IsPlayer() then
health = e:Health()
e:SetHealth( health - 5 )
end
end
[/lua]

I thought the ENT:Touch is serverside, so I popped it in init.lua however ENT comes back nil?

My other question was posted in another thread but basically:

My Collapsible category won’t display correct:
http://img7.imagebanana.com/img/p20grnd7/thumb/Untitled.png

It seems as it’s not opening rather just moving when you select it. This is the code of one of my category.

[lua]
self.PropsCatD = vgui.Create( “DCollapsibleCategory” )
self.PropsCatD:SetSize( (self.LeftX - 10), self.MY )
self.PropsCatD:SetLabel( “Miscellaneus Props” )
self.PropsContD = vgui.Create( “DPanelList” )
self.PropsContD:EnableHorizontal(true)
self.PropsContD:SetAutoSize( true )
self.PropsContD:SetSpacing( 5 )
self.PropsContD:SetPadding( 5 )
self.PropsCatD:SetContents( self.PropsContD )
self.PropsBackground:AddItem( self.PropsCatD )
[/lua]

[lua]
self.MX = self:GetWide()
self.MY = self:GetTall()
self.LeftX = (math.floor((self.MX/2 - 10)/66) * 66) + 11
[/lua]

Extended code:

[lua]
FloodMenu = self
self:SetTitle("")
self:ShowCloseButton(false)
self:SetPos(ScrW()/16, ScrH()/8)
self:SetSize(ScrW() - (ScrW()/8), ScrH() - (ScrH()/4))
self:SetVisible(false)
self.MX = self:GetWide()
self.MY = self:GetTall()
self.LeftX = (math.floor((self.MX/2 - 10)/66) * 66) + 11
self.KeyboardFocus = false

self.LeftTabs = vgui.Create("DPropertySheet")
self.LeftTabs:SetParent(FloodMenu)
self.LeftTabs:SetPos(0, 0)
self.LeftTabs:SetSize(self.LeftX, self.MY)

self.RightTabs = vgui.Create("DPropertySheet")
self.RightTabs:SetParent(FloodMenu)
self.RightTabs:SetPos(self.MX/2, 0)
self.RightTabs:SetSize(self.MX/2, self.MY)

self.PropsBackground = vgui.Create("DPanelList")
self.PropsBackground:SetPos(0, 0)
self.PropsBackground:SetSize(self.LeftTabs:GetWide() - 8, self.LeftTabs:GetTall())
self.PropsBackground:SetPadding(2)
self.PropsBackground:SetSpacing(2)
self.PropsBackground:EnableHorizontal(true)
self.PropsBackground:EnableVerticalScrollbar(true)

	self.PropsCatA = vgui.Create( "DCollapsibleCategory" )	
    self.PropsCatA:SetSize( (self.LeftX - 10), 100 ) 
    self.PropsCatA:SetLabel( "Wooden Props" )        
    self.PropsContA = vgui.Create( "DPanelList" )
    self.PropsContA:EnableHorizontal(true)
    self.PropsContA:SetAutoSize( true )                             
    self.PropsContA:SetSpacing( 5 ) 
    self.PropsContA:SetPadding( 5 ) 
    self.PropsCatA:SetContents( self.PropsContA ) 
    self.PropsBackground:AddItem( self.PropsCatA )  

    self.PropsCatB = vgui.Create( "DCollapsibleCategory" ) 
    self.PropsCatB:SetSize( (self.LeftX - 10), self.MY ) 
    self.PropsCatB:SetLabel( "Plastic Props" )       
    self.PropsContB = vgui.Create( "DPanelList" )
    self.PropsContB:EnableHorizontal(true)          
    self.PropsContB:SetAutoSize( true )                     
    self.PropsContB:SetSpacing( 5 ) 
    self.PropsContB:SetPadding( 5 ) 
    self.PropsCatB:SetContents( self.PropsContB ) 
    self.PropsBackground:AddItem( self.PropsCatB )  

    self.PropsCatC = vgui.Create( "DCollapsibleCategory" ) 
    self.PropsCatC:SetSize( (self.LeftX - 10), self.MY ) 
    self.PropsCatC:SetLabel( "Metal Props" )         
    self.PropsContC = vgui.Create( "DPanelList" )
    self.PropsContC:EnableHorizontal(true)
    self.PropsContC:SetAutoSize( true )     
    self.PropsContC:SetSpacing( 5 ) 
    self.PropsContC:SetPadding( 5 )         
    self.PropsCatC:SetContents( self.PropsContC ) 
    self.PropsBackground:AddItem( self.PropsCatC )  

    self.PropsCatD = vgui.Create( "DCollapsibleCategory" ) 
    self.PropsCatD:SetSize( (self.LeftX - 10), self.MY ) 
    self.PropsCatD:SetLabel( "Miscellaneus Props" )          
    self.PropsContD = vgui.Create( "DPanelList" )
    self.PropsContD:EnableHorizontal(true)  
    self.PropsContD:SetAutoSize( true )                     
    self.PropsContD:SetSpacing( 5 ) 
    self.PropsContD:SetPadding( 5 )         
    self.PropsCatD:SetContents( self.PropsContD ) 
    self.PropsBackground:AddItem( self.PropsCatD )

[/lua]

Try StartTouch instead of Touch.

attempt to index global ‘ENT’ (a nil value)

I don’t think it’s to do with the Touch or StartTouch.

Edit: For the menu’s I filled them up with many different items and it seems fine if there is only 1 row of items in each.