return Instance from Instance.__Index

This commit is contained in:
Quaternions 2024-10-05 21:52:41 -07:00
parent 58edaf3291
commit a23e8fc36f

View File

@ -244,6 +244,7 @@ impl mlua::UserData for Instance{
Some(&rbx_types::Variant::Int64(val))=>return val.into_lua(lua), Some(&rbx_types::Variant::Int64(val))=>return val.into_lua(lua),
Some(&rbx_types::Variant::Float32(val))=>return val.into_lua(lua), Some(&rbx_types::Variant::Float32(val))=>return val.into_lua(lua),
Some(&rbx_types::Variant::Float64(val))=>return val.into_lua(lua), Some(&rbx_types::Variant::Float64(val))=>return val.into_lua(lua),
Some(&rbx_types::Variant::Ref(val))=>return Instance::new(val).into_lua(lua),
Some(&rbx_types::Variant::CFrame(cf))=>return Into::<super::cframe::CFrame>::into(cf).into_lua(lua), Some(&rbx_types::Variant::CFrame(cf))=>return Into::<super::cframe::CFrame>::into(cf).into_lua(lua),
Some(&rbx_types::Variant::Vector3(v))=>return Into::<super::vector3::Vector3>::into(v).into_lua(lua), Some(&rbx_types::Variant::Vector3(v))=>return Into::<super::vector3::Vector3>::into(v).into_lua(lua),
other=>println!("instance.properties.get(i)={other:?}"), other=>println!("instance.properties.get(i)={other:?}"),