From 7774fe9eb47537486053457830bd9ac87e1cf277 Mon Sep 17 00:00:00 2001 From: Quaternions Date: Fri, 4 Oct 2024 16:48:19 -0700 Subject: [PATCH] Instance.__newindex=bool --- src/runner/instance.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/runner/instance.rs b/src/runner/instance.rs index b3e12ba..c3152d5 100644 --- a/src/runner/instance.rs +++ b/src/runner/instance.rs @@ -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(())