• [LUA] Entity:IsOnGround()/OnGround() is always active when teleported.
    0 replies, posted
So I have this code: [CODE] hook.Add("Think", "br_parachute_think", function() for k,v in pairs(player.GetAll()) do if v:IsOnGround() then print("On ground bietch") if v.br_parachute_opened then v.parachute_opened = false v.parachute_done = true v:SetGravity(1) print("Parachute closed") end end end end) [/CODE] and the problem is that (I think) I am teleporting player instantly when spawned. After that the Entity:IsOnGround()/OnGround() is always true. When I kill my self and teleport my self again it'll work fine. Any idea why is it happening?
Sorry, you need to Log In to post a reply to this thread.