generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

I don't know what I did wrong

Previous Thread :: Next Thread 
IoIiderp is not online. IoIiderp
Joined: 05 Feb 2012
Total Posts: 8613
09 May 2015 05:17 AM
game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(char)
local humanoid = char:WaitForChild("Humanoid")
humanoid.FreeFalling:connect(function(active)
local falltime = 0
while true do
if active then
falltime = falltime + 1
wait()
else
break
end
end
print(falltime)
end)
end)
end)

No errors but it keeps printing 0...
Report Abuse
ShadowOfCrimson is not online. ShadowOfCrimson
Joined: 14 Dec 2009
Total Posts: 2153
09 May 2015 05:54 AM
whatever "active" is, is never true.
Report Abuse
IoIiderp is not online. IoIiderp
Joined: 05 Feb 2012
Total Posts: 8613
09 May 2015 07:32 AM
Yes its true when you are falling
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
09 May 2015 07:33 AM
while active do
falltime = falltime+wait(0.08);
print("Falling")
end
Report Abuse
IoIiderp is not online. IoIiderp
Joined: 05 Feb 2012
Total Posts: 8613
09 May 2015 07:49 AM
game.Players.PlayerAdded:connect(function(plr)
plr.CharacterAdded:connect(function(char)
local humanoid = char:WaitForChild("Humanoid")
humanoid.FreeFalling:connect(function(active)
local falltime = 0
while active do
falltime = falltime+wait(0.08);
end
print(falltime)
end)
end)
end)


Still prints 0...
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
09 May 2015 07:51 AM
Then active is never not false or nil

print(active) right at the start of the connection.
Report Abuse
IoIiderp is not online. IoIiderp
Joined: 05 Feb 2012
Total Posts: 8613
09 May 2015 08:15 AM
When you first join, it goes to true, and never goes to false.
But when you jump, it goes to true and when you hit the ground, back to false.
Report Abuse
voItages is not online. voItages
Joined: 02 Nov 2013
Total Posts: 677
09 May 2015 08:16 AM
It's nil or false bro



=volty=
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
09 May 2015 08:16 AM
Are you sure? Because that's not what your script is saying.
Report Abuse
IoIiderp is not online. IoIiderp
Joined: 05 Feb 2012
Total Posts: 8613
09 May 2015 08:17 AM
I don't know, try it out for yourself.
And what do you mean that it isn't saying that?
Report Abuse
voItages is not online. voItages
Joined: 02 Nov 2013
Total Posts: 677
09 May 2015 08:17 AM
*not false :)



=volty=
Report Abuse
IoIiderp is not online. IoIiderp
Joined: 05 Feb 2012
Total Posts: 8613
09 May 2015 08:17 AM
Oh yes, I already tested it before posting here...
Report Abuse
udayk8139 is not online. udayk8139
Joined: 25 Aug 2013
Total Posts: 622
09 May 2015 08:20 AM
Tried it, It doesn't really have a value.. Active is nil..
Report Abuse
IoIiderp is not online. IoIiderp
Joined: 05 Feb 2012
Total Posts: 8613
09 May 2015 08:46 AM
did you define active?
I did

humanoid.FreeFalling:connect(function(active)
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image