Hey! Going through the source I noticed that there are a lot of variables for items that are used from 2-8 times in the script. It may not be a major memory issue, but I don’t think there is a need to shorten the libraries.
Oh whoops! Completely forgot that __index
can cause that, will change as soon as I’m home! Thank you
Oh, would you mind showing what things are repeatedly used? I’ll try and reduce them!
Ohh! You can use .Changed
. Make that said frame change size when the function is called.
slider.Changed:Connect(function(newValue)
local percentage = (newValue / maxValue) * 100 -- maxValue needs to be defined, might add something for this.
frame.Size = UDim2.new(percentage, ...)
end)
That’s a small example, you need to define maxValue
though haha
Something that would be cool is clicking on the sliders holder and the slider moves to that location.
https://gyazo.com/fa211cf6b6086d37115f14c0eb93cb99 Example from miners haven.
Ooh not a bad idea! I’ll try add that soon
Update!
A new feature is here!
Additions
- You can now click on the holder frame/object and the slider will automatically move there! (Suggested by @CocoAlexandra3)
Fixes:
- Fixed a C-Stack overflow in the deprecation alert part of the script
Enjoy!
Isn’t changed deprecated? Can we use GetPropertyChangedSignal?
Changed
is an event so you have to connect to it that way. I’m unsure what you mean by using GetPropertyChangedSignal
, as what would you connect to?
I understand that, but what property are you going to connect to? Changed
is an event, not a property.
Well in your post when you were making the FOV (Camera field of view) you’ve used changed you should probably update it or something
I understand that, but what do I connect to? There’s no property for GetPropertyChangedSignal because Changed
is an event.
it says changed is deprecated but it does not say that Changed deprecated
changed
Changed
Sorry for the light mode I just like the dev hub better
That’s okay, Changed is a completely different event in my module though, it operates on the slider object not an instance.
Changed is perfectly fine to use.
I know, that’s why I asked what Mazen meant when it was deprecated.
Thank you for adding my suggestion. I absolutely love this module and now it much better XD
Haha all good! Hope you like it!