I don’t even understand what are you trying to do by this piece of code you’ve provided.
Give us more information… We don’t know what value is Room and RoomSpec
You’re directly indexing, which makes the VM try to search through the object’s properties and children for something named RoomSpec. You have to use brackets:
function IsLoading(Room, RoomSpec)
local Spec = Room[RoomSpec]
end