Entity/DropToFloor

From Garry's Mod
Jump to: navigation, search
 Entity:DropToFloor( )

Contents

Description

Move an entity down until it collides with something.

WARNING

The entity needs to already have something below it within 256 units.

Examples

Example

Move all props on the server down until they collide with something

for _, ent in pairs( ents.FindByClass( "prop_physics" ) ) do
	ent:DropToFloor( )
end


Examples

Example

Drops players to the ground when they spawn

hook.Add( "PlayerSpawn", "DropGround", function( ply )
	ply:DropToFloor()
end )


Personal tools
Navigation