Skip to content

SetPropCollision

Whether players walk into a prop or through it.

A static prop is solid unless you say otherwise: players, horses and arrows stop at it. false lets everyone walk through it - a decoration in a doorway, a sign over a path; true makes it solid again, at once on every screen. Meshes the game makes no collision for on their own (one built of several collision pieces, such as a crate or a shrine) get one made for them while they are solid. A rigid prop (CreateProp with rigid) is a physics body and always solid.

SetPropCollision(id [, solid])
Parameter Type
id number the prop
solid boolean true (the default) solid, false walked through (optional)

boolean - false for anything that is not a static prop

local barrel = CreateProp("barrel_a", x, y, z, yaw)
SetPropCollision(barrel, false) -- a ghost barrel: the players walk through it

IsPropSolid · CreateProp · SetEntityPrompt · the Props group of the index