diff --git a/packages/lib-roblox/src/instance/mod.rs b/packages/lib-roblox/src/instance/mod.rs index 499b306..1a52222 100644 --- a/packages/lib-roblox/src/instance/mod.rs +++ b/packages/lib-roblox/src/instance/mod.rs @@ -732,6 +732,11 @@ impl LuaUserData for Instance { "Failed to set property '{}' - root instance can not be reparented", prop_name ))); + } else if this.get_class_name() == "DataModel" { + return Err(LuaError::RuntimeError(format!( + "Failed to set property '{}' - DataModel can not be reparented", + prop_name + ))); } type Parent = Option; match Parent::from_lua(prop_value, lua)? {