|
| 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
|
  |
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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 |
|
|
|
| 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
|
  |
| Joined: 05 Aug 2013 |
| Total Posts: 2688 |
|
|
| 24 Jan 2017 02:55 PM |
| Unnecessary argument #10084097234034 |
|
|
| Report Abuse |
|
|
|
| 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 |
|
|