WaitForChildOfClass = function(instance, class_name, timeout) -- Wait for a child of class
if type(timeout) == "number" then
wait(timeout)
return instance:FindFirstChildOfClass(class_name)
end
while not instance:FindFirstChildOfClass(class_name) do
instance.ChildAdded:Wait()
end
return instance:FindFirstChildOfClass(class_name)
end
This isn’t the intended functionality of ‘WaitForChild’. If given a Timeout, this will simply stall the entire time duration (ignoring any instances created in the intermission) and then spit-out an already existing Instance that fits the criteria. Check out this post on how you may actually implement this correctly. (Of course, substituting the now deprecated RbxUtility signal for a BindableEvent.)
Add type checking with the new lua demo? (Of course if you do this please create a separate version of the module as the type checking is not enabled on the server / client)
Update Math Functions
I still see no math.cosecant and math.cotangent, also a math.nroot would be nice; easily implementable via (replace the 3 with n):
On the note of Brendan’s post, you should update the math.cbrt to use his (in my opinion) cleaner method of doing this.
This is assuming people use Color3.fromRGB rather than Color3.new (in which case Color3.new is being used by the function internally, perhaps change this to ValueError: new RGB component is over 1) or alternatively just use clamp and not spit an error?.
I will be making a separate project that doesn’t do any library injection that uses the “classic” way of requiring in the future which will use typed Lua once it is ready. It’s been really unstable rn and so many bugs. Like I can’t even use ipairs(table.pack(...)) without it complaining I need to call it as a method with the : and that the types mismatch.
let me be honest here bro i don’t know anything about math. A friend was using Lua for his math homework or something and he asked if there was a way to use secant. And I asked “what is the formula” and he said it was 1/cos(n) so I made a function that easily did that.
But I did add that root function. Should I remove cbrt since root is added?
Yes, type checking currently is pretty botched. That is why I suggested a separate module / project for it because it is annoying to work with for one, and two it is not enabled ingame.
Hey! I wanted to share something that I’ve been working on for some time. I forked Libraries+ (before the update you just released, and it is up-to-date). If you are interested, I can share what I added.
Here is the link to the Libraries+ fork. I added some functions to it. I did move some functions around (such as pathtostring is now in Rbx_Instance, etc.)
I added Roblox-created libraries, such as Symbol, and cryo.
I changed the main module to be a table with a __call metamethod. I added a function called GetLibraries which gets the Libraries without importing (there’s also the __index metamethod doing its own stuff with retrieving libraries)