I seem to be having an issue with my code.
I am trying to code the weapon so that if it is deployed, after 2 seconds of not being on the ground, the gravity will be changed but as soon as contact is made with the ground, it’ll return back to normal.
So far I have this:
if self.Owner:IsOnGround() == false then
timer.Create( “CheckJump”, 2, 1, function() self.Owner:SetGravity(-1) end )
elseif self.Owner:IsOnGround() == true then
timer.Destroy( “CheckJump” )
It just doesn’t seem to want to work. Where have I gone wrong?
Thanks for any help in advance
[editline]30th March 2015[/editline]
Forgot to include this: