Instance.__newindex=bool

This commit is contained in:
Quaternions 2024-10-04 16:48:19 -07:00
parent 3fabb6dbae
commit 7774fe9eb4

View File

@ -201,6 +201,10 @@ impl Instance{
let typed_value:super::color3::Color3=value.as_userdata().ok_or(mlua::Error::runtime("Expected Color3"))?.take()?;
instance.properties.insert(index_str.to_owned(),rbx_types::Variant::Color3(typed_value.into()));
},
rbx_types::Variant::Bool(_)=>{
let typed_value=value.as_boolean().ok_or(mlua::Error::runtime("Expected boolean"))?;
instance.properties.insert(index_str.to_owned(),rbx_types::Variant::Bool(typed_value));
},
other=>return Err(mlua::Error::runtime(format!("Unimplemented property type: {other:?}"))),
}
Ok(())