zxc76win
(zxc76win)
February 3, 2022, 11:34am
#1
version 0.21b
Install plugin
or
Download Soruce code (34.2 КБ)
How does it work?
The plugin creates a module for any object that has attributes. If the attributes change, the module is updated.
This is what the generated module looks like:
export type Autocomplete = {
TestUdim:UDim2|nil,
TestStringVal:string|nil,
PartColor:BrickColor|nil,
};
local module:Autocomplete = {
TestUdim = script.Parent:GetAttribute('TestUdim'),
TestStringVal = script.Parent:GetAttribute('TestStringVal'),
PartColor = script.Parent:GetAttribute('PartColor'),
};
script.Parent.AttributeChanged:Connect(function(_key)
module[_key] = script.Parent:GetAttribute(_key)
end)
return module;
As you can see, typing is taken into account here. Also if the attribute is removed during the game, nothing will happen.
Video:
Useful.
I don’t use attributes.
I don’t need it.
1 Like
Qinrir
(Quin)
February 3, 2022, 11:44am
#2
It is nice but I mostly use values and stuff attributes are just not for me
[P.S (Make the poll multiple choice please)]
zxc76win
(zxc76win)
February 3, 2022, 11:48am
#3
I don’t use attributes myself xD
They’re not handy.
Qinrir
(Quin)
February 3, 2022, 11:48am
#4
Yes exactly so I dont think there is a point of making the plugin unless some weirdo (no offense) uses attributes. Attributes are bad just because they are a headache to use
regexman
(reg)
February 3, 2022, 6:21pm
#6
Sorry to be that guy here but, what’s stopping you from just assigning a variable with the attribute name.
zxc76win
(zxc76win)
February 4, 2022, 1:57pm
#7
Sorry. Translation difficulties. Can you show me the script?
zxc76win
(zxc76win)
February 4, 2022, 2:28pm
#8
Understood. Yes indeed, .Get was superfluous. I guess I got carried away.
Thank you
Updated the plugin
I couldn’t possibly use a module daily that has typos in it. It’s Complete
, not Complite
.
zxc76win
(zxc76win)
February 9, 2022, 11:11am
#10
I only noticed that. Sorry.
What if I update and correct the typo?
1 Like