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
 

Re: [HELP] Waiting for an event to fire

Previous Thread :: Next Thread 
KritikalGunzz is not online. KritikalGunzz
Joined: 10 Nov 2013
Total Posts: 1633
24 Jan 2017 01:25 PM
How would I go about waiting for an event to fire in this context?

I want to play the animation as long as the wait time or the mouseButton1 is released.

I tried this:

if wait(loadedanim.Length) or mouse.Button1Up then
print("got here")
loadedanim:Stop()
start = false
end

But only runs when the wait time is over, not when the mouse button is released.
Report Abuse
chimmihc is not online. chimmihc
Joined: 01 Sep 2014
Total Posts: 17143
24 Jan 2017 01:46 PM
local ready, time, connection = false, 0

connection = someEventConnection()
ready = true
connection:Disconnect()
connection = nil
end

repeat
time = time + wait()
until time >= loadedanim.Length or ready

if connection then
connection:Disconnect()
end

--stuff


Report Abuse
UltimateRaheem is not online. UltimateRaheem
Joined: 10 Nov 2012
Total Posts: 1886
24 Jan 2017 01:49 PM
Idk if this works, so don't criticise me!

object.Touched:Wait(function(hit)

end)

or

repeat
wait(waitTime)

until
object.Touched:Connect(function(hit)

end)


Want to be supported by developers in a positive atmosphere? Then join Studio BSD: https://www.roblox.com/My/Groups.aspx?gid=1013064
Report Abuse
Scriptural is not online. Scriptural
Joined: 06 Sep 2013
Total Posts: 2979
24 Jan 2017 01:53 PM
Idk if this works, so don't criticise me!

Why should not knowing free you from criticism?


Report Abuse
UltimateRaheem is not online. UltimateRaheem
Joined: 10 Nov 2012
Total Posts: 1886
24 Jan 2017 02:44 PM
Is there a problem with trying?


Want to be supported by developers in a positive atmosphere? Then join Studio BSD: https://www.roblox.com/My/Groups.aspx?gid=1013064
Report Abuse
Scriptural is not online. Scriptural
Joined: 06 Sep 2013
Total Posts: 2979
24 Jan 2017 02:53 PM
No but there is a problem with expecting to be free from criticism.

Criticism is not a bad thing, and you will never prevent people from giving it.
You could have said
"I don't know if this will work but I'm trying to help"

Then again, I'm fully prepared to admit I'm wrong if someone criticizes me about what I'm saying in a way I think makes sense.

Criticism is a step to learning.


Report Abuse
UltimateRaheem is not online. UltimateRaheem
Joined: 10 Nov 2012
Total Posts: 1886
24 Jan 2017 02:54 PM
I meant it as in being rude. Sorry if I wasn't clear enough.


Want to be supported by developers in a positive atmosphere? Then join Studio BSD: https://www.roblox.com/My/Groups.aspx?gid=1013064
Report Abuse
mybowls72 is not online. mybowls72
Joined: 05 Aug 2013
Total Posts: 2688
24 Jan 2017 02:55 PM
Unnecessary argument #10084097234034
Report Abuse
Scriptural is not online. Scriptural
Joined: 06 Sep 2013
Total Posts: 2979
24 Jan 2017 02:58 PM
"Unnecessary argument #10084097234034"

Most arguments are unnecessary, want to argue about it?


"I meant it as in being rude. Sorry if I wasn't clear enough."
I can agree with that, most rude criticism is less effective. Not to say I haven't been guilty of it.


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