mirror of
https://github.com/centau/vide.git
synced 2026-08-20 14:41:37 +00:00
This commit is contained in:
parent
0d542c66a6
commit
7dead44ac5
9 changed files with 207 additions and 173 deletions
|
|
@ -113,6 +113,7 @@ local Instance = {} :: any do
|
|||
local function __newindex(userdata: userdata, property: string, value: unknown)
|
||||
local data = get_data(userdata)
|
||||
if property == "Name" then
|
||||
if type(value) ~= "string" then error("name must be a string", 2) end
|
||||
data.name = value :: string
|
||||
elseif property == "Parent" then
|
||||
assert(value == nil or is_instance(value), "attempt to set non-instance as parent")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue