Making a successful func_door with GLua

I’ve been trying to do this, but the door doesn’t seem to respond at all, I’ll post the code I have so far.

[lua]
local FixedDoor = ents.Create(“func_door”)
FixedDoor:SetPos( Vector(0,0,0) )
FixedDoor:SetModel(“models/props_c17/door01_left.mdl”)
FixedDoor:Activate()

[/lua]

I get one error, and I can’t figure out what’s causing it or how to fix it. Any help would be appreciated.

ERROR: Can’t draw studio model models/props_c17/door01_left.mdl because CBaseDoor is not derived from C_BaseAnimating

Use prop_rotating_door class. Func_ classes are for brush entities.

I’m using prop at func_door, when I set pheonix prop everithing fine, but when try to gate prop: this error

Oh no, i remembered, prop does not matter, but anyway i know work around!
U need use PropDynamic for simulate door visually and set no draw func_door to avoid spam error + disable shadow on func_door to avoid double shadow, and parenting prop_dynamic to func_door for weld it and disable collision of prop_dynamic

Piece of my code:



local door = ents.Create("func_door")
door:SetModel("models/hunter/blocks/cube1x2x025.mdl")
door:SetNoDraw(true)
door:SetPos(Pos)
door:SetAngles(Ang)
door:SetKeyValue("movedir","90 0 0")
door:SetKeyValue("noise1","doors/doormove3.wav")
door:SetKeyValue("noise2","doors/doorstop1.wav")
door:SetKeyValue("rendercolor","255 255 255")
door:SetKeyValue("renderamt",255)
door:SetKeyValue("speed",100)
door:SetKeyValue("lip",-85)
door:SetKeyValue("targetname","sdoor")
door:SetKeyValue("wait",4)
door:Spawn()
door:Activate()

local dprop = ents.Create("prop_dynamic")
dprop:SetModel(door:GetModel())
dprop:SetMaterial("models/props_combine/health_charger_glass")
dprop:SetPos(door:GetPos())
dprop:SetAngles(door:GetAngles())
dprop:SetParent(door)
dprop:Spawn()
dprop:Activate()


It works fine!