From 05c05f891ad279f70dd7ce6d37289566bf5c6f15 Mon Sep 17 00:00:00 2001 From: legokidlogan <26103433+legokidlogan@users.noreply.github.com> Date: Sun, 27 Sep 2026 11:53:08 -0500 Subject: [PATCH 1/3] Account for client-only holos being userdata --- lua/starfall/instance.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lua/starfall/instance.lua b/lua/starfall/instance.lua index 5dbf72f21..e4ac3cbb2 100644 --- a/lua/starfall/instance.lua +++ b/lua/starfall/instance.lua @@ -338,12 +338,14 @@ function SF.Instance:BuildEnvironment() end end end + + local tID = TypeID(object) -- Do not elseif here because strings do have a metatable. - if safe_types[TypeID(object)] then + if safe_types[tID] then return object end - -- Clientside holograms don't have a gmod metatype so check manually - if isentity(object) and object.IsSFHologram then + -- Holograms don't have a gmod metatable, check manually. Client-only holos count as userdata. + if (tID == TYPE_USERDATA or isentity(object)) and object.IsSFHologram then return self.Types.Hologram.Wrap(object) end end From bb70019c28490fa5099080e264eab82d3cef2c0a Mon Sep 17 00:00:00 2001 From: legokidlogan <26103433+legokidlogan@users.noreply.github.com> Date: Tue, 29 Sep 2026 14:42:57 -0500 Subject: [PATCH 2/3] Simplify --- lua/starfall/instance.lua | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lua/starfall/instance.lua b/lua/starfall/instance.lua index e4ac3cbb2..4ec91e71a 100644 --- a/lua/starfall/instance.lua +++ b/lua/starfall/instance.lua @@ -338,14 +338,12 @@ function SF.Instance:BuildEnvironment() end end end - - local tID = TypeID(object) -- Do not elseif here because strings do have a metatable. - if safe_types[tID] then + if safe_types[TypeID(object)] then return object end - -- Holograms don't have a gmod metatable, check manually. Client-only holos count as userdata. - if (tID == TYPE_USERDATA or isentity(object)) and object.IsSFHologram then + -- Holograms don't have a gmod metatable, check manually + if metatable and metatable.__index and object.IsSFHologram then return self.Types.Hologram.Wrap(object) end end From 58f72b35848e3d07dbd4aec690cf9ffe3bcdd5c8 Mon Sep 17 00:00:00 2001 From: thegrb93 Date: Tue, 29 Sep 2026 23:27:34 -0400 Subject: [PATCH 3/3] Revert comment --- lua/starfall/instance.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/starfall/instance.lua b/lua/starfall/instance.lua index 4ec91e71a..b37812222 100644 --- a/lua/starfall/instance.lua +++ b/lua/starfall/instance.lua @@ -342,7 +342,7 @@ function SF.Instance:BuildEnvironment() if safe_types[TypeID(object)] then return object end - -- Holograms don't have a gmod metatable, check manually + -- Clientside holograms don't have a gmod metatype so check manually if metatable and metatable.__index and object.IsSFHologram then return self.Types.Hologram.Wrap(object) end