How do i make this work?

if self.dt.State == IS_AIMING then
ply:ChatPrint ( “Test” )
return
Does anyone know how to make the chatprint part work

make sure self.dt.State is equal to IS_AIMING

It is

Above that code put
[lua]print(self.dt.State)[/lua]
Always use prints like these to see what the code actually thinks your variable is when you debug.