Opening a door with the force of lua!

Okey, here is the problem. I got a little map with 2 doors. The first door is called “henrik” and the other one is called “bob”.

Is it possible to make a function / command that opens one of these doors? Let’s say i want to open “henrik”.
If so… how, are there any wiki pages to help me maybe?

Use the search function, I made a thread about that 2 days ago.


Okey, i will look for it!

Edit: That’s all good, but it doesn’t give an answer to my questions completely. How would i specify the command to only open the door “henrik”?

bump! I know its possible, but the functions… anyone know?

look at the flood gamemode the water going up and down is the same



function OpenDoor()

for k, v in pairs(ents.FindByName("henrik")) do


Works fine!

just a little note. Your entities name has to be henrik for this to work :stuck_out_tongue:

The entity name is henrik, it says so in the first post.