Player.Freeze not working as intended.

Hi, I’m making a sortof grappling hook thing, and I want so that, whenever the player presses W or S, he moves up and down the rope. Okay, I got that working, but what I don’t get working is that the player will still move as if he would walk. **[Player.Freeze

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Player.Freeze)** is ment to fix this, but it doesn’t do a single splat. I tried using **[Player.Lock

http://wiki.garrysmod.com/favicon.ico](http://wiki.garrysmod.com/?title=Player.Lock)**, but it doesn’t read keypresses. What should I do?

Another question, how do I disable gravity of a player? I tried doing “Player:GetPhysicsObject():EnableGravity(false)”, but it doesn’t change anything. The only way I can think of is by using SetGravity, but I can’t turn off gravity with it, only make it insanely small, which is kinda hacky.

What is the code?
You should have ply:Freeze(true) dont forget the true. Also remember that this prevents them from looking around which you might not want with a grappling hook.

As for the gravity. Do you maybe have to disable the gravity for each bone, similar to what is in the example in the wiki for the ragdoll?

The way I’ve always done it is made a SENT with physics and parent the player to the SENT, and rope the SENT. Constantly set the player’s velocity to player:GetVelocity()-1 though because they will attempt to fall constantly and it will kill the player with fall damage if he is close enough to the ground. The reason player:GetVelocity()-1 because setting velocity to 0 doesn’t do shit. Its additive or something on players.

I think SetLocalVelocity actually sets the velocity, while SetVelocity adds to the velocity. But yeah, I’ll try these, thanks :smiley:

It wasn’t like that before…