Hi, you’ve been heavily misinformed.
First of all, the “construct” functions are helper functions for GMod tools and you shouldn’t be using them like that at all. Forget about them.
A much simpler way to set the material property of your entity is this:
[lua]local phys = self:GetPhysicsObject()
Also, this should be done in your entity’s Initialize function. You set the material once, and it’s going to keep it forever, no need to set the material every time something touches it.
Oh also, unless something has changed in the past few months, it’s not going to work!
Changing the physical properties of an entity unfortunately doesn’t affect the way players walk on them.
Apparently there’s another property which is independent from the physics material, and as far as I know there’s no way to change it in Lua. If you want to check this, try to replace “ice” with “slipperymetal”, it’s the material which is used by the PHX monorail props, which are extremely slippery when you walk on them. If it works, then that’s good. If it doesn’t, it probably means what you’re trying to do is impossible at the moment.
Actually, it would be possible to modify the player’s movement hooks and simulate friction (or the lack thereof), but that would be completely out of reach if you’re still a Lua beginner.